4.5. Selected Functions

The following table lists the definition and form of commonly used functions.

Function nameForm of functionDefinition
Mathematical
LOGLOG(numValue)Natural logarithm
LOG10LOG10(numValue)Logarithm to the base 10
Descriptive Statistics
MAXMAX(numValue,numValue,...)Largest non-missing value
MEANMEAN(numValue,numValue,...)Arithmetic mean of non-missing values
MINMIN(numValue,numValue,...)Smallest non-missing value
SUMSUM(numValue,numValue,...)Sum of non-missing values
Character
LENGTHLENGTH(charValue)Returns the length of a character value not counting trailing blanks (missing values have a length of 1)
SUBSTR{Extract}SUBSTR(charValue,position,n)Extracts a substring from a character value starting at ‘position’ for ‘n’ characters or ...

Get The Little SAS® Book for Enterprise Guide® 4.1 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.