SAS Functions and CALL Routines by Category

These are the categories for SAS functions and CALL routines:
Arithmeticreturns the result of a division that handles special missing values for ODS output.
Arrayreturns information about arrays.
Bitwise Logical Operationsreturns the bitwise logical result for an argument.
CASFunctions that run on the CAS server.
Characterreturns information based on character data.
Character String Matchingreturns information from Perl regular expressions.
Combinatorialgenerates combinations and permutations.
Date and Timereturns date and time values, including time intervals.
Descriptive Statisticsreturns statistical values, such as mean, median, and standard deviation.
Distancereturns the geodetic distance.
External Filesreturns information that is associated with external files.
External Routinesreturns a character or numeric value, or calls a routine without any return code.
Financialcalculates financial values such as interest, periodic payments, depreciation, and prices for European options on stocks.
Hyperbolicperforms hyperbolic calculations such as sine, cosine, and tangent.
Macroassigns a value to a macro variable, returns the value of a macro variable, determines whether a macro variable is global or local in scope, and identifies whether a macro variable exists.
Mathematicalperforms mathematical calculations such as factorials, absolute value, fuzzy comparisons, and logarithms.
Numericreturns a numeric value based on whether an expression is true, false, or missing, or determines whether a software image exists in the installed version of SAS.
Probabilityreturns probability calculations, such as from a chi-square or Poisson distribution.
Quantilereturns a quantile from specific distributions.
Random Numberreturns random variates from specific distributions.
SAS File I/Oreturns information about SAS files.
Searchsearches for character or numeric values.
Sortsorts the values of character or numeric arguments.
Specialreturns and stores memory addresses, writes a value directly into memory, suspends execution of a program, submits an operating-environment command for execution, returns the value of a SAS system or graphics option, specifies formats and informats at run time, returns the system return code, returns the UUID, determines whether a product is licensed, as well as returns other information about SAS processing.
State and ZIP Codereturns ZIP codes, FIPS codes, state and city names, postal codes, and the geodetic distance between ZIP codes.
Trigonometricreturns trigonometric values such as sine, cosine, and tangent.
Truncationtruncates numeric values and returns numeric values, often using fuzzing, or zero fuzzing.
Variable Controlassigns variable labels, links SAS data set variables to DATA step or macro variables, and assigns variable names.
Variable Informationreturns a name, type, length, informat name, label, and other variable information.
Web Servicecalls a web service or a SAS registered web service.
Web Toolsencodes and decodes a string of data.
CategoryLanguage ElementsDescription
ArithmeticDIVIDE FunctionReturns the result of a division that handles special missing values for ODS output.
ArrayDIM FunctionReturns the number of elements in an array.
HBOUND FunctionReturns the upper bound of an array.
LBOUND FunctionReturns the lower bound of an array.
Bitwise Logical OperationsBAND FunctionReturns the bitwise logical AND of two arguments.
BLSHIFT FunctionReturns the bitwise logical left shift of two arguments.
BNOT FunctionReturns the bitwise logical NOT of an argument.
BOR FunctionReturns the bitwise logical OR of two arguments.
BRSHIFT FunctionReturns the bitwise logical right shift of two arguments.
BXOR FunctionReturns the bitwise logical EXCLUSIVE OR of two arguments.
CASABS FunctionReturns the absolute value.
AIRY FunctionReturns the value of the Airy function.
ANYALNUM FunctionSearches a character string for an alphanumeric character, and returns the first position at which the character is found.
ANYALPHA FunctionSearches a character string for an alphabetic character, and returns the first position at which the character is found.
ANYCNTRL FunctionSearches a character string for a control character, and returns the first position at which that character is found.
ANYDIGIT FunctionSearches a character string for a digit, and returns the first position at which the digit is found.
ANYFIRST FunctionSearches a character string for a character that is valid as the first character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
ANYGRAPH FunctionSearches a character string for a graphical character, and returns the first position at which that character is found.
ANYLOWER FunctionSearches a character string for a lowercase letter, and returns the first position at which the letter is found.
ANYNAME FunctionSearches a character string for a character that is valid in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
ANYPRINT FunctionSearches a character string for a printable character, and returns the first position at which that character is found.
ANYPUNCT FunctionSearches a character string for a punctuation character, and returns the first position at which that character is found.
ANYSPACE FunctionSearches a character string for a Whitespace character (blank, horizontal and vertical tab, carriage return, line feed, and form feed), and returns the first position at which that character is found.
ANYUPPER FunctionSearches a character string for an uppercase letter, and returns the first position at which the letter is found.
ANYXDIGIT FunctionSearches a character string for a hexadecimal character that represents a digit, and returns the first position at which that character is found.
ARCOS FunctionReturns the arccosine.
ARCOSH FunctionReturns the inverse hyperbolic cosine.
ARSIN FunctionReturns the arcsine.
ARSINH FunctionReturns the inverse hyperbolic sine.
ARTANH FunctionReturns the inverse hyperbolic tangent.
ATAN FunctionReturns the arc tangent.
ATAN2 FunctionReturns the arc tangent of the ratio of two numeric variables.
BAND FunctionReturns the bitwise logical AND of two arguments.
BETA FunctionReturns the value of the beta function.
BETAINV FunctionReturns a quantile from the beta distribution.
BLACKCLPRC FunctionCalculates call prices for European options on futures, based on the Black model.
BLACKPTPRC FunctionCalculates put prices for European options on futures, based on the Black model.
BLKSHCLPRC FunctionCalculates call prices for European options on stocks, based on the Black-Scholes model.
BLKSHPTPRC FunctionCalculates put prices for European options on stocks, based on the Black-Scholes model.
BLSHIFT FunctionReturns the bitwise logical left shift of two arguments.
BNOT FunctionReturns the bitwise logical NOT of an argument.
BOR FunctionReturns the bitwise logical OR of two arguments.
BRSHIFT FunctionReturns the bitwise logical right shift of two arguments.
BXOR FunctionReturns the bitwise logical EXCLUSIVE OR of two arguments.
BYTE FunctionReturns one character in the ASCII collating sequence.
CALL LABEL RoutineAssigns a variable label to a specified character variable.
CALL MISSING RoutineAssigns missing values to the specified character or numeric variables.
CALL PRXFREE RoutineFrees memory that was allocated for a Perl regular expression.
CALL SCAN RoutineReturns the position and length of the nth word from a character string.
CALL SLEEP RoutineFor a specified period of time, suspends the execution of a program that invokes this CALL routine.
CALL STREAMINIT RoutineSpecifies a seed value to use for subsequent random number generation by the RAND function.
CALL VNAME RoutineAssigns a variable name as the value of a specified variable.
CALL VNEXT RoutineReturns the name, type, and length of a variable that is used in a DATA step.
CDF FunctionReturns a value from a cumulative probability distribution.
CEIL FunctionReturns the smallest integer that is greater than or equal to the argument, fuzzed to avoid unexpected floating-point results.
CEILZ FunctionReturns the smallest integer that is greater than or equal to the argument, using zero fuzzing.
CHOOSEC FunctionReturns a character value that represents the results of choosing from a list of arguments.
CHOOSEN FunctionReturns a numeric value that represents the results of choosing from a list of arguments.
CNONCT FunctionReturns the noncentrality parameter from a chi-square distribution.
COALESCE FunctionReturns the first nonmissing value from a list of numeric arguments.
COALESCEC FunctionReturns the first nonmissing value from a list of character arguments.
COLLATE FunctionReturns a character string in the ASCII collating sequence.
COMB FunctionComputes the number of combinations of n elements taken r at a time.
COMPARE FunctionReturns the position of the leftmost character by which two strings differ, or returns 0 if there is no difference.
COMPBL FunctionRemoves multiple blanks from a character string.
COMPFUZZ FunctionPerforms a fuzzy comparison of two numeric values.
COMPOUND FunctionReturns compound interest parameters.
COMPRESS FunctionReturns a character string with specified characters removed from the original string.
CONSTANT FunctionComputes machine and mathematical constants.
CONVX FunctionReturns the convexity for an enumerated cash flow.
CONVXP FunctionReturns the convexity for a periodic cash flow stream, such as a bond.
COS FunctionReturns the cosine.
COSH FunctionReturns the hyperbolic cosine.
COT FunctionReturns the cotangent.
COUNT FunctionCounts the number of times that a specified substring appears within a character string.
COUNTC FunctionCounts the number of characters in a string that appear or do not appear in a list of characters.
COUNTW FunctionCounts the number of words in a character string.
CSC FunctionReturns the cosecant.
CSS FunctionReturns the corrected sum of squares.
CUMIPMT FunctionReturns the cumulative interest paid on a loan between the start and end period.
CUMPRINC FunctionReturns the cumulative principal paid on a loan between the start and end period.
CV FunctionReturns the coefficient of variation.
DAIRY FunctionReturns the derivative of the AIRY function.
DATDIF FunctionReturns the number of days between two dates after computing the difference between the dates according to specified day count conventions.
DATE FunctionReturns the current date as a SAS date value.
DATEJUL FunctionConverts a Julian date to a SAS date value.
DATEPART FunctionExtracts the date from a SAS datetime value.
DATETIME FunctionReturns the current date and time of day as a SAS datetime value.
DAY FunctionReturns the day of the month from a SAS date value.
DEQUOTE FunctionRemoves matching quotation marks from a character string that begins with a quotation mark, and deletes all characters to the right of the closing quotation mark.
DEVIANCE FunctionReturns the deviance based on a probability distribution.
DHMS FunctionReturns a SAS datetime value from date, hour, minute, and second values.
DIF FunctionReturns differences between an argument and its nth lag.
DIGAMMA FunctionReturns the value of the digamma function.
DIM FunctionReturns the number of elements in an array.
DIVIDE FunctionReturns the result of a division that handles special missing values for ODS output.
DUR FunctionReturns the modified duration for an enumerated cash flow.
DURP FunctionReturns the modified duration for a periodic cash flow stream, such as a bond.
EFFRATE FunctionReturns the effective annual interest rate.
ERF FunctionReturns the value of the (normal) error function.
ERFC FunctionReturns the value of the complementary (normal) error function.
EXP FunctionReturns the value of the exponential function.
FACT FunctionComputes a factorial.
FINANCE FunctionComputes financial calculations such as depreciation, maturation, accrued interest, net present value, periodic savings, and internal rates of return.
FIND FunctionSearches for a specific substring of characters within a character string.
FINDC FunctionSearches a string for any character in a list of characters.
FINDW FunctionReturns the character position of a word in a string, or returns the number of the word in a string.
FLOOR FunctionReturns the largest integer that is less than or equal to the argument, fuzzed to avoid unexpected floating-point results.
FLOORZ FunctionReturns the largest integer that is less than or equal to the argument, using zero fuzzing.
FNONCT FunctionReturns the value of the noncentrality parameter of an F distribution.
FUZZ FunctionReturns the nearest integer if the argument is within 1E−12 of that integer.
GAMINV FunctionReturns a quantile from the gamma distribution.
GARKHCLPRC FunctionCalculates call prices for European options on stocks, based on the Garman-Kohlhagen model.
GARKHPTPRC FunctionCalculates put prices for European options on stocks, based on the Garman-Kohlhagen model.
GCD FunctionReturns the greatest common divisor for one or more integers.
GEODIST FunctionReturns the geodetic distance between two latitude and longitude coordinates.
GEOMEAN FunctionReturns the geometric mean.
GEOMEANZ FunctionReturns the geometric mean, using zero fuzzing.
HARMEAN FunctionReturns the harmonic mean.
HARMEANZ FunctionReturns the harmonic mean, using zero fuzzing.
HBOUND FunctionReturns the upper bound of an array.
HMS FunctionReturns a SAS time value from hour, minute, and second values.
HOLIDAY FunctionReturns a SAS date value of a specified holiday for a specified year.
HOUR FunctionReturns the hour from a SAS time or datetime value.
IBESSEL FunctionReturns the value of the modified Bessel function.
INDEX FunctionSearches a character expression for a string of characters, and returns the position of the string's first character for the first occurrence of the string.
INDEXC FunctionSearches a character expression for any of the specified characters, and returns the position of that character.
INDEXW FunctionSearches a character expression for a string that is specified as a word, and returns the position of the first character in the word.
INPUT FunctionReturns the value that is produced when SAS converts an expression by using the specified informat.
INPUTC FunctionEnables you to specify a character informat at run time.
INPUTN FunctionEnables you to specify a numeric informat at run time.
INT FunctionReturns the integer value, fuzzed to avoid unexpected floating-point results.
INTCINDEX FunctionReturns the cycle index when a date, time, or datetime interval and value are specified.
INTCK FunctionReturns the number of interval boundaries of a given kind that lie between two dates, times, or datetime values.
INTCYCLE FunctionReturns the date, time, or datetime interval at the next higher seasonal cycle when a date, time, or datetime interval is specified.
INTFIT FunctionReturns a time interval that is aligned between two dates.
INTFMT FunctionReturns a recommended SAS format when a date, time, or datetime interval is specified.
INTGET FunctionReturns a time interval based on three date or datetime values.
INTINDEX FunctionReturns the seasonal index when a date, time, or datetime interval and value are specified.
INTNEST FunctionCalculates the number of whole periods of the smaller interval that will fit into the period of the larger interval.
INTNX FunctionIncrements a date, time, or datetime value by a given time interval, and returns a date, time, or datetime value.
INTRR FunctionReturns the internal rate of return as a fraction.
INTSEAS FunctionReturns the length of the seasonal cycle when a date, time, or datetime interval is specified.
INTSHIFT FunctionReturns the shift interval that corresponds to the base interval.
INTTEST FunctionReturns 1 if a time interval is valid, and returns 0 if a time interval is invalid.
INTZ FunctionReturns the integer portion of the argument, using zero fuzzing.
IPMT FunctionReturns the interest payment for a given period for a constant payment loan or the periodic savings for a future balance.
IQR FunctionReturns the interquartile range.
IRR FunctionReturns the internal rate of return as a percentage.
JBESSEL FunctionReturns the value of the Bessel function.
JULDATE FunctionReturns the Julian date from a SAS date value.
JULDATE7 FunctionReturns a seven-digit Julian date from a SAS date value.
KURTOSIS FunctionReturns the kurtosis.
LAG FunctionReturns values from a queue.
LARGEST FunctionReturns the kth largest nonmissing value.
LBOUND FunctionReturns the lower bound of an array.
LCM FunctionReturns the least common multiple.
LCOMB FunctionComputes the logarithm of the COMB function, which is the logarithm of the number of combinations of n objects taken r at a time.
LEFT FunctionLeft-aligns a character string.
LENGTH FunctionReturns the length of a non-blank character string, excluding trailing blanks, and returns 1 for a blank character string.
LENGTHC FunctionReturns the length of a character string, including trailing blanks.
LENGTHM FunctionReturns the amount of memory (in bytes) that is allocated for a character string.
LENGTHN FunctionReturns the length of a character string, excluding trailing blanks.
LFACT FunctionComputes the logarithm of the FACT (factorial) function.
LGAMMA FunctionReturns the natural logarithm of the Gamma function.
LOG FunctionReturns the natural (base e) logarithm.
LOG1PX FunctionReturns the log of 1 plus the argument.
LOG10 FunctionReturns the logarithm to the base 10.
LOG2 FunctionReturns the logarithm to the base 2.
LOGBETA FunctionReturns the logarithm of the beta function.
LOGCDF FunctionReturns the logarithm of a left cumulative distribution function.
LOGPDF FunctionReturns the logarithm of a probability density (mass) function.
LOGSDF FunctionReturns the logarithm of a survival function.
LOWCASE FunctionConverts all uppercase single-width English alphabet letters in an argument to lowercase.
LPERM FunctionComputes the logarithm of the PERM function, which is the logarithm of the number of permutations of n objects, with the option of including r number of elements.
MAD FunctionReturns the median absolute deviation from the median.
MARGRCLPRC FunctionCalculates call prices for European options on stocks, based on the Margrabe model.
MARGRPTPRC FunctionCalculates put prices for European options on stocks, based on the Margrabe model.
MAX FunctionReturns the largest value.
MD5 FunctionReturns the result of the message digest of a specified string.
MDY FunctionReturns a SAS date value from month, day, and year values.
MEAN FunctionReturns the arithmetic mean (average).
MEDIAN FunctionReturns the median value.
MIN FunctionReturns the smallest value.
MINUTE FunctionReturns the minute from a SAS time or datetime value.
MISSING FunctionReturns a numeric result that indicates whether the argument contains a missing value.
MOD FunctionReturns the remainder from the division of the first argument by the second argument, fuzzed to avoid most unexpected floating-point results.
MODZ FunctionReturns the remainder from the division of the first argument by the second argument, using zero fuzzing.
MONTH FunctionReturns the month from a SAS date value.
MORT FunctionReturns amortization parameters.
N FunctionReturns the number of nonmissing numeric values.
NETPV FunctionReturns the net present value as a percent.
NMISS FunctionReturns the number of missing numeric values.
NOMRATE FunctionReturns the nominal annual interest rate.
NOTALNUM FunctionSearches a character string for a non-alphanumeric character, and returns the first position at which the character is found.
NOTALPHA FunctionSearches a character string for a nonalphabetic character, and returns the first position at which the character is found.
NOTCNTRL FunctionSearches a character string for a character that is not a control character, and returns the first position at which that character is found.
NOTDIGIT FunctionSearches a character string for any character that is not a digit, and returns the first position at which that character is found.
NOTFIRST FunctionSearches a character string for an invalid first character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
NOTGRAPH FunctionSearches a character string for a non-graphical character, and returns the first position at which that character is found.
NOTLOWER FunctionSearches a character string for a character that is not a lowercase letter, and returns the first position at which that character is found.
NOTNAME FunctionSearches a character string for an invalid character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
NOTPRINT FunctionSearches a character string for a nonprintable character, and returns the first position at which that character is found.
NOTPUNCT FunctionSearches a character string for a character that is not a punctuation character, and returns the first position at which that character is found.
NOTSPACE FunctionSearches a character string for a character that is not a whitespace character (blank, horizontal and vertical tab, carriage return, line feed, and form feed), and returns the first position at which that character is found.
NOTUPPER FunctionSearches a character string for a character that is not an uppercase letter, and returns the first position at which that character is found.
NOTXDIGIT FunctionSearches a character string for a character that is not a hexadecimal character, and returns the first position at which that character is found.
NPV FunctionReturns the net present value with the rate expressed as a percentage.
NWKDOM FunctionReturns the date for the nth occurrence of a weekday for the specified month and year.
ORDINAL FunctionReturns the kth smallest of the missing and nonmissing values.
PCTL FunctionReturns the percentile that corresponds to the percentage.
PDF FunctionReturns a value from a probability density (mass) distribution.
PERM FunctionComputes the number of permutations of n items that are taken r at a time.
PMT FunctionReturns the periodic payment for a constant payment loan or the periodic savings for a future balance.
POISSON FunctionReturns the probability from a Poisson distribution.
PPMT FunctionReturns the principal payment for a given period for a constant payment loan or the periodic savings for a future balance.
PROBBETA FunctionReturns the probability from a beta distribution.
PROBBNML FunctionReturns the probability from a binomial distribution.
PROBBNRM FunctionReturns a probability from a bivariate normal distribution.
PROBCHI FunctionReturns the probability from a chi-square distribution.
PROBF FunctionReturns the probability from an F distribution.
PROBGAM FunctionReturns the probability from a gamma distribution.
PROBHYPR FunctionReturns the probability from a hypergeometric distribution.
PROBIT FunctionReturns a quantile from the standard normal distribution.
PROBMC FunctionReturns a probability or a quantile from various distributions for multiple comparisons of means.
PROBNEGB FunctionReturns the probability from a negative binomial distribution.
PROBNORM FunctionReturns the probability from the standard normal distribution.
PROBT FunctionReturns the probability from a t distribution.
PRXCHANGE FunctionPerforms a pattern-matching replacement.
PRXMATCH FunctionSearches for a pattern match and returns the position at which the pattern is found.
PRXPARSE FunctionCompiles a Perl regular expression (PRX) that can be used for pattern matching of a character value.
PRXPOSN FunctionReturns a character string that contains the value for a capture buffer.
PUT FunctionReturns a value using a specified format.
PVP FunctionReturns the present value for a periodic cash flow stream (such as a bond), with repayment of principal at maturity.
QTR FunctionReturns the quarter of the year from a SAS date value.
QUANTILE FunctionReturns the quantile from a distribution when you specify the left probability (CDF).
QUOTE FunctionAdds double quotation marks to a character value.
RAND FunctionGenerates random numbers from a distribution that you specify.
RANGE FunctionReturns the range of the nonmissing values.
RANK FunctionReturns the position of a character in the ASCII collating sequence.
REPEAT FunctionReturns a character value that consists of the first argument repeated n+1 times.
REVERSE FunctionReverses a character string.
RIGHT FunctionRight aligns a character expression.
RMS FunctionReturns the root mean square of the nonmissing arguments.
ROUND FunctionRounds the first argument to the nearest multiple of the second argument, or to the nearest integer when the second argument is omitted.
ROUNDE FunctionRounds the first argument to the nearest multiple of the second argument, and returns an even multiple when the first argument is halfway between the two nearest multiples.
ROUNDZ FunctionRounds the first argument to the nearest multiple of the second argument, using zero fuzzing.
SAVINGS FunctionReturns the balance of a periodic savings by using variable interest rates.
SCAN FunctionReturns the nth word from a character string.
SDF FunctionReturns a survival function.
SEC FunctionReturns the secant.
SECOND FunctionReturns the seconds and milliseconds from a SAS time or datetime value.
SIGN FunctionReturns the sign of a value.
SHA256HEX FunctionReturns the result of the message digest of a specified string and converts the string to hexadecimal representation.
SHA256HMACHEX FunctionReturns the result of the message digest of a specified string by using the Hash-based Message Authentication (HMAC) algorithm.
SIN FunctionReturns the sine.
SINH FunctionReturns the hyperbolic sine.
SKEWNESS FunctionReturns the skewness of the nonmissing arguments.
SLEEP FunctionSuspends the execution of a program that invokes this function for a period of time.
SMALLEST FunctionReturns the kth smallest nonmissing value.
SQRT FunctionReturns the square root of a value.
STD FunctionReturns the standard deviation of the nonmissing arguments.
STDERR FunctionReturns the standard error of the mean of the nonmissing arguments.
STRIP FunctionReturns a character string with all leading and trailing blanks removed.
SUBSTR (left of =) FunctionReplaces character value contents.
SUBSTR (right of =) FunctionExtracts a substring from an argument.
SUBSTRN FunctionReturns a substring, allowing a result with a length of zero.
SUM FunctionReturns the sum of the nonmissing arguments.
SUMABS FunctionReturns the sum of the absolute values of the nonmissing arguments.
TAN FunctionReturns the tangent.
TIME FunctionReturns the current time of day as a numeric SAS time value.
TIMEPART FunctionExtracts a time value from a SAS datetime value.
TIMEVALUE FunctionReturns the equivalent of a reference amount at a base date by using variable interest rates.
TINV FunctionReturns a quantile from the t distribution.
TNONCT FunctionReturns the value of the noncentrality parameter from the Student's t distribution.
TODAY FunctionReturns the current date as a numeric SAS date value.
TRANSLATE FunctionReplaces specific characters in a character expression.
TRANSTRN FunctionReplaces or removes all occurrences of a substring in a character string.
TRANWRD FunctionReplaces all occurrences of a substring in a character string.
TRIGAMMA FunctionReturns the value of the trigamma function.
TRIM FunctionRemoves trailing blanks from a character string, and returns one blank if the string is missing.
TRIMN FunctionRemoves trailing blanks from character expressions, and returns a string with a length of zero if the expression is missing.
TRUNC FunctionTruncates a numeric value to a specified number of bytes.
UNIFORM FunctionReturns a random variate from a uniform distribution.
UPCASE FunctionConverts all lowercase single-width English alphabet letters in an argument to uppercase.
USS FunctionReturns the uncorrected sum of squares of the nonmissing arguments.
UUIDGEN FunctionReturns the short or binary form of a Universally Unique Identifier (UUID).
VAR FunctionReturns the variance of the nonmissing arguments.
VARRAY FunctionReturns a value that indicates whether the specified name is an array.
VARRAYX FunctionReturns a value that indicates whether the value of the specified argument is an array.
VERIFY FunctionReturns the position of the first character in a string that is not in any of several other strings.
VFORMAT FunctionReturns the format that is associated with the specified variable.
VFORMATD FunctionReturns the decimal value of the format that is associated with the specified variable.
VFORMATDX FunctionReturns the decimal value of the format that is associated with the value of the specified argument.
VFORMATN FunctionReturns the format name that is associated with the specified variable.
VFORMATNX FunctionReturns the format name that is associated with the value of the specified argument.
VFORMATW FunctionReturns the format width that is associated with the specified variable.
VFORMATWX FunctionReturns the format width that is associated with the value of the specified argument.
VFORMATX FunctionReturns the format that is associated with the value of the specified argument.
VINARRAY FunctionReturns a value that indicates whether the specified variable is a member of an array.
VINARRAYX FunctionReturns a value that indicates whether the value of the specified argument is a member of an array.
VINFORMAT FunctionReturns the informat that is associated with the specified variable.
VINFORMATD FunctionReturns the decimal value of the informat that is associated with the specified variable.
VINFORMATDX FunctionReturns the decimal value of the informat that is associated with the value of the specified variable.
VINFORMATN FunctionReturns the informat name that is associated with the specified variable.
VINFORMATNX FunctionReturns the informat name that is associated with the value of the specified argument.
VINFORMATW FunctionReturns the informat width that is associated with the specified variable.
VINFORMATWX FunctionReturns the informat width that is associated with the value of the specified argument.
VINFORMATX FunctionReturns the informat that is associated with the value of the specified argument.
VLABEL FunctionReturns the label that is associated with the specified variable.
VLABELX FunctionReturns the label that is associated with the value of the specified argument.
VLENGTH FunctionReturns the compile-time (allocated) size of the specified variable.
VLENGTHX FunctionReturns the compile-time (allocated) size for the variable that has a name that is the same as the value of the argument.
VNAME FunctionReturns the name of the specified variable.
VNAMEX FunctionValidates the value of the specified argument as a variable name.
VTYPE FunctionReturns the type (character or numeric) of the specified variable.
VTYPEX FunctionReturns the type (character or numeric) for the value of the specified argument.
VVALUE FunctionReturns the formatted value that is associated with the variable that you specify.
VVALUEX FunctionReturns the formatted value that is associated with the argument that you specify.
WEEK FunctionReturns the week-number value.
WEEKDAY FunctionFrom a SAS date value, returns an integer that corresponds to the day of the week.
WHICHC FunctionSearches for a character value that is equal to the first argument, and returns the index of the first matching value.
WHICHN FunctionSearches for a numeric value that is equal to the first argument, and returns the index of the first matching value.
YEAR FunctionReturns the year from a SAS date value.
YIELDP FunctionReturns the yield-to-maturity for a periodic cash flow stream, such as a bond.
YRDIF FunctionReturns the difference in years between two dates according to specified day count conventions; returns a person’s age.
YYQ FunctionReturns a SAS date value from year and quarter year values.
CharacterANYALNUM FunctionSearches a character string for an alphanumeric character, and returns the first position at which the character is found.
ANYALPHA FunctionSearches a character string for an alphabetic character, and returns the first position at which the character is found.
ANYCNTRL FunctionSearches a character string for a control character, and returns the first position at which that character is found.
ANYDIGIT FunctionSearches a character string for a digit, and returns the first position at which the digit is found.
ANYFIRST FunctionSearches a character string for a character that is valid as the first character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
ANYGRAPH FunctionSearches a character string for a graphical character, and returns the first position at which that character is found.
ANYLOWER FunctionSearches a character string for a lowercase letter, and returns the first position at which the letter is found.
ANYNAME FunctionSearches a character string for a character that is valid in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
ANYPRINT FunctionSearches a character string for a printable character, and returns the first position at which that character is found.
ANYPUNCT FunctionSearches a character string for a punctuation character, and returns the first position at which that character is found.
ANYSPACE FunctionSearches a character string for a Whitespace character (blank, horizontal and vertical tab, carriage return, line feed, and form feed), and returns the first position at which that character is found.
ANYUPPER FunctionSearches a character string for an uppercase letter, and returns the first position at which the letter is found.
ANYXDIGIT FunctionSearches a character string for a hexadecimal character that represents a digit, and returns the first position at which that character is found.
BYTE FunctionReturns one character in the ASCII collating sequence.
CALL CATS RoutineRemoves leading and trailing blanks, and returns a concatenated character string.
CALL CATT RoutineRemoves trailing blanks, and returns a concatenated character string.
CALL CATX RoutineRemoves leading and trailing blanks, inserts delimiters, and returns a concatenated character string.
CALL COMPCOST RoutineSets the costs of operations for later use by the COMPGED function
CALL MISSING RoutineAssigns missing values to the specified character or numeric variables.
CALL SCAN RoutineReturns the position and length of the nth word from a character string.
CAT FunctionDoes not remove leading or trailing blanks, and returns a concatenated character string.
CATQ FunctionConcatenates character or numeric values by using a delimiter to separate items and by adding quotation marks to strings that contain the delimiter.
CATS FunctionRemoves leading and trailing blanks, and returns a concatenated character string.
CATT FunctionRemoves trailing blanks, and returns a concatenated character string.
CATX FunctionRemoves leading and trailing blanks, inserts delimiters, and returns a concatenated character string.
CHAR FunctionReturns a single character from a specified position in a character string.
CHOOSEC FunctionReturns a character value that represents the results of choosing from a list of arguments.
CHOOSEN FunctionReturns a numeric value that represents the results of choosing from a list of arguments.
COALESCEC FunctionReturns the first nonmissing value from a list of character arguments.
COLLATE FunctionReturns a character string in the ASCII collating sequence.
COMPARE FunctionReturns the position of the leftmost character by which two strings differ, or returns 0 if there is no difference.
COMPBL FunctionRemoves multiple blanks from a character string.
COMPGED FunctionReturns the generalized edit distance between two strings.
COMPLEV FunctionReturns the Levenshtein edit distance between two strings.
COMPRESS FunctionReturns a character string with specified characters removed from the original string.
COUNT FunctionCounts the number of times that a specified substring appears within a character string.
COUNTC FunctionCounts the number of characters in a string that appear or do not appear in a list of characters.
COUNTW FunctionCounts the number of words in a character string.
DEQUOTE FunctionRemoves matching quotation marks from a character string that begins with a quotation mark, and deletes all characters to the right of the closing quotation mark.
FIND FunctionSearches for a specific substring of characters within a character string.
FINDC FunctionSearches a string for any character in a list of characters.
FINDW FunctionReturns the character position of a word in a string, or returns the number of the word in a string.
FIRST FunctionReturns the first character in a character string.
IFC FunctionReturns a character value based on whether an expression is true, false, or missing.
INDEX FunctionSearches a character expression for a string of characters, and returns the position of the string's first character for the first occurrence of the string.
INDEXC FunctionSearches a character expression for any of the specified characters, and returns the position of that character.
INDEXW FunctionSearches a character expression for a string that is specified as a word, and returns the position of the first character in the word.
LEFT FunctionLeft-aligns a character string.
LENGTH FunctionReturns the length of a non-blank character string, excluding trailing blanks, and returns 1 for a blank character string.
LENGTHC FunctionReturns the length of a character string, including trailing blanks.
LENGTHM FunctionReturns the amount of memory (in bytes) that is allocated for a character string.
LENGTHN FunctionReturns the length of a character string, excluding trailing blanks.
LOWCASE FunctionConverts all uppercase single-width English alphabet letters in an argument to lowercase.
MD5 FunctionReturns the result of the message digest of a specified string.
MISSING FunctionReturns a numeric result that indicates whether the argument contains a missing value.
MVALID FunctionChecks the validity of a character string for use as a SAS member name.
NLITERAL FunctionConverts a character string that you specify to a SAS name literal.
NOTALNUM FunctionSearches a character string for a non-alphanumeric character, and returns the first position at which the character is found.
NOTALPHA FunctionSearches a character string for a nonalphabetic character, and returns the first position at which the character is found.
NOTCNTRL FunctionSearches a character string for a character that is not a control character, and returns the first position at which that character is found.
NOTDIGIT FunctionSearches a character string for any character that is not a digit, and returns the first position at which that character is found.
NOTFIRST FunctionSearches a character string for an invalid first character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
NOTGRAPH FunctionSearches a character string for a non-graphical character, and returns the first position at which that character is found.
NOTLOWER FunctionSearches a character string for a character that is not a lowercase letter, and returns the first position at which that character is found.
NOTNAME FunctionSearches a character string for an invalid character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
NOTPRINT FunctionSearches a character string for a nonprintable character, and returns the first position at which that character is found.
NOTPUNCT FunctionSearches a character string for a character that is not a punctuation character, and returns the first position at which that character is found.
NOTSPACE FunctionSearches a character string for a character that is not a whitespace character (blank, horizontal and vertical tab, carriage return, line feed, and form feed), and returns the first position at which that character is found.
NOTUPPER FunctionSearches a character string for a character that is not an uppercase letter, and returns the first position at which that character is found.
NOTXDIGIT FunctionSearches a character string for a character that is not a hexadecimal character, and returns the first position at which that character is found.
NVALID FunctionChecks the validity of a character string for use as a SAS variable name.
PROPCASE FunctionConverts all words in an argument to proper case.
QUOTE FunctionAdds double quotation marks to a character value.
RANK FunctionReturns the position of a character in the ASCII collating sequence.
REPEAT FunctionReturns a character value that consists of the first argument repeated n+1 times.
REVERSE FunctionReverses a character string.
RIGHT FunctionRight aligns a character expression.
SCAN FunctionReturns the nth word from a character string.
SHA256 FunctionReturns the result of the message digest of a specified string.
SHA256HEX FunctionReturns the result of the message digest of a specified string and converts the string to hexadecimal representation.
SHA256HMACHEX FunctionReturns the result of the message digest of a specified string by using the Hash-based Message Authentication (HMAC) algorithm.
SOUNDEX FunctionEncodes a string to facilitate searching.
SPEDIS FunctionDetermines the likelihood of two words matching, expressed as the asymmetric spelling distance between the two words.
STRIP FunctionReturns a character string with all leading and trailing blanks removed.
SUBPAD FunctionReturns a substring that has a length that you specify, using blank padding if necessary.
SUBSTR (left of =) FunctionReplaces character value contents.
SUBSTR (right of =) FunctionExtracts a substring from an argument.
SUBSTRN FunctionReturns a substring, allowing a result with a length of zero.
TRANSLATE FunctionReplaces specific characters in a character expression.
TRANSTRN FunctionReplaces or removes all occurrences of a substring in a character string.
TRANWRD FunctionReplaces all occurrences of a substring in a character string.
TRIM FunctionRemoves trailing blanks from a character string, and returns one blank if the string is missing.
TRIMN FunctionRemoves trailing blanks from character expressions, and returns a string with a length of zero if the expression is missing.
TYPEOF FunctionReturns a value that indicates whether the argument is character or numeric.
UPCASE FunctionConverts all lowercase single-width English alphabet letters in an argument to uppercase.
VERIFY FunctionReturns the position of the first character in a string that is not in any of several other strings.
Character String MatchingCALL PRXCHANGE RoutinePerforms a pattern-matching replacement.
CALL PRXDEBUG RoutineEnables Perl regular expressions in a DATA step to send debugging output to the SAS log.
CALL PRXFREE RoutineFrees memory that was allocated for a Perl regular expression.
CALL PRXNEXT RoutineReturns the position and length of a substring that matches a pattern, and iterates over multiple matches within one string.
CALL PRXPOSN RoutineReturns the start position and length for a capture buffer.
CALL PRXSUBSTR RoutineReturns the position and length of a substring that matches a pattern.
PRXCHANGE FunctionPerforms a pattern-matching replacement.
PRXMATCH FunctionSearches for a pattern match and returns the position at which the pattern is found.
PRXPARSE FunctionCompiles a Perl regular expression (PRX) that can be used for pattern matching of a character value.
PRXPOSN FunctionReturns a character string that contains the value for a capture buffer.
PRXPAREN FunctionReturns the last bracket match for which there is a match in a pattern.
CombinatorialALLCOMB FunctionGenerates all combinations of the values of n variables taken k at a time in a minimal change order.
ALLPERM FunctionGenerates all permutations of the values of several variables in a minimal change order.
CALL ALLCOMB RoutineGenerates all combinations of the values of n variables taken k at a time in a minimal change order.
CALL ALLCOMBI RoutineGenerates all combinations of the indices of n objects taken k at a time in a minimal change order.
CALL ALLPERM RoutineGenerates all permutations of the values of several variables in a minimal change order.
CALL GRAYCODE RoutineGenerates all subsets of n items in a minimal change order.
CALL LEXCOMB RoutineGenerates all distinct combinations of the nonmissing values of n variables taken k at a time in lexicographic order.
CALL LEXCOMBI RoutineGenerates all combinations of the indices of n objects taken k at a time in lexicographic order.
CALL LEXPERK RoutineGenerates all distinct permutations of the nonmissing values of n variables taken k at a time in lexicographic order.
CALL LEXPERM RoutineGenerates all distinct permutations of the nonmissing values of several variables in lexicographic order.
CALL RANCOMB RoutinePermutes the values of the arguments, and returns a random combination of k out of n values.
CALL RANPERK RoutinePermutes the values of the arguments, and returns a random permutation of k out of n values.
CALL RANPERM RoutineRandomly permutes the values of the arguments.
COMB FunctionComputes the number of combinations of n elements taken r at a time.
GRAYCODE FunctionGenerates all subsets of n items in a minimal change order.
LCOMB FunctionComputes the logarithm of the COMB function, which is the logarithm of the number of combinations of n objects taken r at a time.
LEXCOMB FunctionGenerates all distinct combinations of the nonmissing values of n variables taken k at a time in lexicographic order.
LEXCOMBI FunctionGenerates all combinations of the indices of n objects taken k at a time in lexicographic order.
LEXPERK FunctionGenerates all distinct permutations of the nonmissing values of n variables taken k at a time in lexicographic order.
LEXPERM FunctionGenerates all distinct permutations of the nonmissing values of several variables in lexicographic order.
LEXPERK FunctionGenerates all distinct permutations of the nonmissing values of n variables taken k at a time in lexicographic order.
LEXPERM FunctionGenerates all distinct permutations of the nonmissing values of several variables in lexicographic order.
LFACT FunctionComputes the logarithm of the FACT (factorial) function.
LPERM FunctionComputes the logarithm of the PERM function, which is the logarithm of the number of permutations of n objects, with the option of including r number of elements.
PERM FunctionComputes the number of permutations of n items that are taken r at a time.
Date and TimeCALL IS8601_CONVERT RoutineConverts an ISO 8601 interval to datetime and duration values, or converts datetime and duration values to an ISO 8601 interval.
DATDIF FunctionReturns the number of days between two dates after computing the difference between the dates according to specified day count conventions.
DATE FunctionReturns the current date as a SAS date value.
DATEJUL FunctionConverts a Julian date to a SAS date value.
DATEPART FunctionExtracts the date from a SAS datetime value.
DATETIME FunctionReturns the current date and time of day as a SAS datetime value.
DAY FunctionReturns the day of the month from a SAS date value.
DHMS FunctionReturns a SAS datetime value from date, hour, minute, and second values.
HMS FunctionReturns a SAS time value from hour, minute, and second values.
HOLIDAY FunctionReturns a SAS date value of a specified holiday for a specified year.
HOLIDAYCK FunctionReturns the number of occurrences of the holiday value between date1 and date2.
HOLIDAYCOUNT FunctionReturns the number of holidays defined for a SAS date value.
HOLIDAYNAME FunctionReturns the name of the holiday that corresponds to the SAS date or a blank string if a holiday is not defined for the SAS date.
HOLIDAYNX FunctionReturns the nth occurrence of the holiday relative to the date argument.
HOLIDAYNY FunctionReturns the nth occurrence of the holiday for the year.
HOLIDAYTEST FunctionReturns 1 if the holiday occurs on the SAS date value.
HOUR FunctionReturns the hour from a SAS time or datetime value.
INTCINDEX FunctionReturns the cycle index when a date, time, or datetime interval and value are specified.
INTCK FunctionReturns the number of interval boundaries of a given kind that lie between two dates, times, or datetime values.
INTCYCLE FunctionReturns the date, time, or datetime interval at the next higher seasonal cycle when a date, time, or datetime interval is specified.
INTFIT FunctionReturns a time interval that is aligned between two dates.
INTFMT FunctionReturns a recommended SAS format when a date, time, or datetime interval is specified.
INTGET FunctionReturns a time interval based on three date or datetime values.
INTINDEX FunctionReturns the seasonal index when a date, time, or datetime interval and value are specified.
INTNEST FunctionCalculates the number of whole periods of the smaller interval that will fit into the period of the larger interval.
INTNX FunctionIncrements a date, time, or datetime value by a given time interval, and returns a date, time, or datetime value.
INTSEAS FunctionReturns the length of the seasonal cycle when a date, time, or datetime interval is specified.
INTSHIFT FunctionReturns the shift interval that corresponds to the base interval.
INTTEST FunctionReturns 1 if a time interval is valid, and returns 0 if a time interval is invalid.
JULDATE FunctionReturns the Julian date from a SAS date value.
JULDATE7 FunctionReturns a seven-digit Julian date from a SAS date value.
MDY FunctionReturns a SAS date value from month, day, and year values.
MINUTE FunctionReturns the minute from a SAS time or datetime value.
MONTH FunctionReturns the month from a SAS date value.
NWKDOM FunctionReturns the date for the nth occurrence of a weekday for the specified month and year.
QTR FunctionReturns the quarter of the year from a SAS date value.
SECOND FunctionReturns the seconds and milliseconds from a SAS time or datetime value.
TIME FunctionReturns the current time of day as a numeric SAS time value.
TIMEPART FunctionExtracts a time value from a SAS datetime value.
TODAY FunctionReturns the current date as a numeric SAS date value.
TZONEID FunctionReturns the current time zone ID.
TZONENAME FunctionReturns the current standard or daylight savings time, time zone name.
TZONEOFF FunctionReturns the user time zone offset.
TZONES2U FunctionConverts a SAS date time value to a UTC date time value.
TZONEU2S FunctionConverts a UTC date time value to a SAS date time value.
WEEK FunctionReturns the week-number value.
WEEKDAY FunctionFrom a SAS date value, returns an integer that corresponds to the day of the week.
YEAR FunctionReturns the year from a SAS date value.
YRDIF FunctionReturns the difference in years between two dates according to specified day count conventions; returns a person’s age.
YYQ FunctionReturns a SAS date value from year and quarter year values.
Descriptive StatisticsCMISS FunctionCounts the number of missing arguments.
CSS FunctionReturns the corrected sum of squares.
CV FunctionReturns the coefficient of variation.
EUCLID FunctionReturns the Euclidean norm of the nonmissing arguments.
GEOMEAN FunctionReturns the geometric mean.
GEOMEANZ FunctionReturns the geometric mean, using zero fuzzing.
HARMEAN FunctionReturns the harmonic mean.
HARMEANZ FunctionReturns the harmonic mean, using zero fuzzing.
IQR FunctionReturns the interquartile range.
KURTOSIS FunctionReturns the kurtosis.
LARGEST FunctionReturns the kth largest nonmissing value.
LPNORM FunctionReturns the Lp norm of the second argument and subsequent nonmissing arguments.
MAD FunctionReturns the median absolute deviation from the median.
MAX FunctionReturns the largest value.
MEAN FunctionReturns the arithmetic mean (average).
MEDIAN FunctionReturns the median value.
MIN FunctionReturns the smallest value.
MISSING FunctionReturns a numeric result that indicates whether the argument contains a missing value.
N FunctionReturns the number of nonmissing numeric values.
NMISS FunctionReturns the number of missing numeric values.
ORDINAL FunctionReturns the kth smallest of the missing and nonmissing values.
PCTL FunctionReturns the percentile that corresponds to the percentage.
RANGE FunctionReturns the range of the nonmissing values.
RMS FunctionReturns the root mean square of the nonmissing arguments.
SKEWNESS FunctionReturns the skewness of the nonmissing arguments.
SMALLEST FunctionReturns the kth smallest nonmissing value.
STD FunctionReturns the standard deviation of the nonmissing arguments.
STDERR FunctionReturns the standard error of the mean of the nonmissing arguments.
SUM FunctionReturns the sum of the nonmissing arguments.
SUMABS FunctionReturns the sum of the absolute values of the nonmissing arguments.
USS FunctionReturns the uncorrected sum of squares of the nonmissing arguments.
VAR FunctionReturns the variance of the nonmissing arguments.
DistanceGEODIST FunctionReturns the geodetic distance between two latitude and longitude coordinates.
ZIPCITYDISTANCE FunctionReturns the geodetic distance between two ZIP code locations.
External FilesDCLOSE FunctionCloses a directory that was opened by the DOPEN function.
DCREATE FunctionReturns the complete pathname of a new, external directory.
DINFO FunctionReturns information about a directory.
DNUM FunctionReturns the number of members in a directory.
DOPEN FunctionOpens a directory, and returns a directory identifier value.
DOPTNAME FunctionReturns directory attribute information.
DOPTNUM FunctionReturns the number of information items that are available for a directory.
DREAD FunctionReturns the name of a directory member.
DROPNOTE FunctionDeletes a note marker from a SAS data set or an external file.
FAPPEND FunctionAppends the current record to the end of an external file.
FCLOSE FunctionCloses an external file, directory, or directory member.
FCOL FunctionReturns the current column position in the File Data Buffer (FDB).
FDELETE FunctionDeletes an external file or an empty directory.
FEXIST FunctionVerifies the existence of an external file that is associated with a fileref.
FGET FunctionCopies data from the File Data Buffer (FDB) into a variable.
FILEEXIST FunctionVerifies the existence of an external file by its physical name.
FILENAME FunctionAssigns or deassigns a fileref to an external file, directory, or output device.
FILEREF FunctionVerifies whether a fileref has been assigned for the current SAS session.
FINFO FunctionReturns the value of a file information item.
FNOTE FunctionIdentifies the last record that was read, and returns a value that the FPOINT function can use.
FOPEN FunctionOpens an external file and returns a file identifier value.
FOPTNAME FunctionReturns the name of an item of information about an external file.
FOPTNUM FunctionReturns the number of information items, such as filename or record length, that are available for an external file.
FPOINT FunctionPositions the read pointer on the next record to be read.
FPOS FunctionSets the position of the column pointer in the File Data Buffer (FDB).
FPUT FunctionMoves data to the File Data Buffer (FDB) of an external file, starting at the FDB's current column position.
FREAD FunctionReads a record from an external file into the File Data Buffer (FDB).
FREWIND FunctionPositions the file pointer to the start of the file.
FRLEN FunctionReturns the size of the last record that was read, or, if the file is opened for output, returns the current record size.
FSEP FunctionSets the token delimiters for the FGET function.
FWRITE FunctionWrites a record to an external file.
MOPEN FunctionOpens a file by directory ID and member name, and returns either the file identifier or a 0.
PATHNAME FunctionReturns the physical name of an external file or a SAS library, or returns a blank.
RENAME FunctionRenames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.
SYSMSG FunctionReturns error or warning message text from processing the last data set or external file function.
SYSRC FunctionReturns a system error number.
External RoutinesCALL MODULE RoutineCalls an external routine without any return code.
MODULE FunctionCalls a specific routine or module that resides in an external dynamic link library (DLL).
MODULEC FunctionCalls an external routine and returns a character value.
MODULEN FunctionCalls an external routine and returns a numeric value.
FinancialBLACKCLPRC FunctionCalculates call prices for European options on futures, based on the Black model.
BLACKPTPRC FunctionCalculates put prices for European options on futures, based on the Black model.
BLKSHCLPRC FunctionCalculates call prices for European options on stocks, based on the Black-Scholes model.
BLKSHPTPRC FunctionCalculates put prices for European options on stocks, based on the Black-Scholes model.
COMPOUND FunctionReturns compound interest parameters.
CONVX FunctionReturns the convexity for an enumerated cash flow.
CONVXP FunctionReturns the convexity for a periodic cash flow stream, such as a bond.
CUMIPMT FunctionReturns the cumulative interest paid on a loan between the start and end period.
CUMPRINC FunctionReturns the cumulative principal paid on a loan between the start and end period.
DACCDB FunctionReturns the accumulated declining balance depreciation.
DACCDBSL FunctionReturns the accumulated declining balance with conversion to a straight-line depreciation.
DACCSL FunctionReturns the accumulated straight-line depreciation.
DACCSYD FunctionReturns the accumulated sum-of-years-digits depreciation.
DACCTAB FunctionReturns the accumulated depreciation from specified tables.
DEPDB FunctionReturns the declining balance depreciation.
DEPDBSL FunctionReturns the declining balance with conversion to a straight-line depreciation.
DEPSL FunctionReturns the straight-line depreciation.
DEPSYD FunctionReturns the sum-of-years-digits depreciation.
DEPTAB FunctionReturns the depreciation from specified tables.
DUR FunctionReturns the modified duration for an enumerated cash flow.
DURP FunctionReturns the modified duration for a periodic cash flow stream, such as a bond.
EFFRATE FunctionReturns the effective annual interest rate.
FINANCE FunctionComputes financial calculations such as depreciation, maturation, accrued interest, net present value, periodic savings, and internal rates of return.
GARKHCLPRC FunctionCalculates call prices for European options on stocks, based on the Garman-Kohlhagen model.
GARKHPTPRC FunctionCalculates put prices for European options on stocks, based on the Garman-Kohlhagen model.
INTRR FunctionReturns the internal rate of return as a fraction.
IPMT FunctionReturns the interest payment for a given period for a constant payment loan or the periodic savings for a future balance.
IRR FunctionReturns the internal rate of return as a percentage.
MARGRCLPRC FunctionCalculates call prices for European options on stocks, based on the Margrabe model.
MARGRPTPRC FunctionCalculates put prices for European options on stocks, based on the Margrabe model.
MORT FunctionReturns amortization parameters.
NETPV FunctionReturns the net present value as a percent.
NOMRATE FunctionReturns the nominal annual interest rate.
NPV FunctionReturns the net present value with the rate expressed as a percentage.
PMT FunctionReturns the periodic payment for a constant payment loan or the periodic savings for a future balance.
PPMT FunctionReturns the principal payment for a given period for a constant payment loan or the periodic savings for a future balance.
PVP FunctionReturns the present value for a periodic cash flow stream (such as a bond), with repayment of principal at maturity.
SAVINGS FunctionReturns the balance of a periodic savings by using variable interest rates.
TIMEVALUE FunctionReturns the equivalent of a reference amount at a base date by using variable interest rates.
YIELDP FunctionReturns the yield-to-maturity for a periodic cash flow stream, such as a bond.
HyperbolicARCOSH FunctionReturns the inverse hyperbolic cosine.
ARSINH FunctionReturns the inverse hyperbolic sine.
ARTANH FunctionReturns the inverse hyperbolic tangent.
COSH FunctionReturns the hyperbolic cosine.
SINH FunctionReturns the hyperbolic sine.
TANH FunctionReturns the hyperbolic tangent.
MacroCALL EXECUTE RoutineResolves the argument, and issues the resolved value for execution at the next step boundary.
CALL SYMPUT RoutineAssigns DATA step information to a macro variable.
CALL SYMPUTX RoutineAssigns a value to a macro variable, and removes both leading and trailing blanks.
DOSUBL Function Imports macro variables from the calling environment, and exports macro variables back to the calling environment.
RESOLVE FunctionReturns the resolved value of the argument after the argument has been processed by the macro facility.
SYMEXIST FunctionReturns an indication of the existence of a macro variable.
SYMGET FunctionReturns the value of a macro variable during DATA step execution.
SYMGLOBL FunctionReturns an indication of whether a macro variable is in global scope to the DATA step during DATA step execution.
SYMLOCAL FunctionReturns an indication of whether a macro variable is in local scope to the DATA step during DATA step execution.
MathematicalABS FunctionReturns the absolute value.
AIRY FunctionReturns the value of the Airy function.
BETA FunctionReturns the value of the beta function.
CALL LOGISTIC RoutineApplies the logistic function to each argument.
CALL SOFTMAX RoutineReturns the softmax value.
CALL STDIZE RoutineStandardizes the values of one or more variables.
CALL TANH RoutineReturns the hyperbolic tangent.
CNONCT FunctionReturns the noncentrality parameter from a chi-square distribution.
COALESCE FunctionReturns the first nonmissing value from a list of numeric arguments.
COMPFUZZ FunctionPerforms a fuzzy comparison of two numeric values.
CONSTANT FunctionComputes machine and mathematical constants.
DAIRY FunctionReturns the derivative of the AIRY function.
DEVIANCE FunctionReturns the deviance based on a probability distribution.
DIGAMMA FunctionReturns the value of the digamma function.
ERF FunctionReturns the value of the (normal) error function.
ERFC FunctionReturns the value of the complementary (normal) error function.
EXP FunctionReturns the value of the exponential function.
FACT FunctionComputes a factorial.
FNONCT FunctionReturns the value of the noncentrality parameter of an F distribution.
GAMMA FunctionReturns the value of the gamma function.
GCD FunctionReturns the greatest common divisor for one or more integers.
IBESSEL FunctionReturns the value of the modified Bessel function.
JBESSEL FunctionReturns the value of the Bessel function.
LCM FunctionReturns the least common multiple.
LGAMMA FunctionReturns the natural logarithm of the Gamma function.
LOGISTIC FunctionReturns the logistic transformation of the argument.
LOG FunctionReturns the natural (base e) logarithm.
LOG1PX FunctionReturns the log of 1 plus the argument.
LOG10 FunctionReturns the logarithm to the base 10.
LOG2 FunctionReturns the logarithm to the base 2.
LOGBETA FunctionReturns the logarithm of the beta function.
MOD FunctionReturns the remainder from the division of the first argument by the second argument, fuzzed to avoid most unexpected floating-point results.
MODZ FunctionReturns the remainder from the division of the first argument by the second argument, using zero fuzzing.
MSPLINT FunctionReturns the ordinate of a monotonicity-preserving interpolating spline.
SIGN FunctionReturns the sign of a value.
SQRT FunctionReturns the square root of a value.
TNONCT FunctionReturns the value of the noncentrality parameter from the Student's t distribution.
TRIGAMMA FunctionReturns the value of the trigamma function.
NumericIFN FunctionReturns a numeric value based on whether an expression is true, false, or missing.
MODEXIST FunctionDetermines whether a software image exists in the version of SAS that you have installed.
ProbabilityCDF FunctionReturns a value from a cumulative probability distribution.
LOGCDF FunctionReturns the logarithm of a left cumulative distribution function.
LOGPDF FunctionReturns the logarithm of a probability density (mass) function.
LOGSDF FunctionReturns the logarithm of a survival function.
PDF FunctionReturns a value from a probability density (mass) distribution.
POISSON FunctionReturns the probability from a Poisson distribution.
PROBBETA FunctionReturns the probability from a beta distribution.
PROBBNML FunctionReturns the probability from a binomial distribution.
PROBBNRM FunctionReturns a probability from a bivariate normal distribution.
PROBCHI FunctionReturns the probability from a chi-square distribution.
PROBF FunctionReturns the probability from an F distribution.
PROBGAM FunctionReturns the probability from a gamma distribution.
PROBHYPR FunctionReturns the probability from a hypergeometric distribution.
PROBMC FunctionReturns a probability or a quantile from various distributions for multiple comparisons of means.
PROBNEGB FunctionReturns the probability from a negative binomial distribution.
PROBNORM FunctionReturns the probability from the standard normal distribution.
PROBT FunctionReturns the probability from a t distribution.
SDF FunctionReturns a survival function.
QuantileBETAINV FunctionReturns a quantile from the beta distribution.
CINV FunctionReturns a quantile from the chi-square distribution.
FINV FunctionReturns a quantile from the F distribution.
GAMINV FunctionReturns a quantile from the gamma distribution.
PROBIT FunctionReturns a quantile from the standard normal distribution.
QUANTILE FunctionReturns the quantile from a distribution when you specify the left probability (CDF).
SQUANTILE FunctionReturns the quantile from a distribution when you specify the right probability (SDF).
TINV FunctionReturns a quantile from the t distribution.
Random NumberCALL RANBIN RoutineReturns a random variate from a binomial distribution.
CALL RANCAU RoutineReturns a random variate from a Cauchy distribution.
CALL RANEXP RoutineReturns a random variate from an exponential distribution.
CALL RANGAM RoutineReturns a random variate from a gamma distribution.
CALL RANNOR RoutineReturns a random variate from a normal distribution.
CALL RANPOI RoutineReturns a random variate from a Poisson distribution.
CALL RANTBL RoutineReturns a random variate from a tabled probability distribution.
CALL RANTRI RoutineReturns a random variate from a triangular distribution.
CALL RANUNI RoutineReturns a random variate from a uniform distribution.
CALL STREAMINIT RoutineSpecifies a seed value to use for subsequent random number generation by the RAND function.
NORMAL FunctionReturns a random variate from a normal, or Gaussian, distribution.
RANBIN FunctionReturns a random variate from a binomial distribution.
RANCAU FunctionReturns a random variate from a Cauchy distribution.
RAND FunctionGenerates random numbers from a distribution that you specify.
RANEXP FunctionReturns a random variate from an exponential distribution.
RANGAM FunctionReturns a random variate from a gamma distribution.
RANNOR FunctionReturns a random variate from a normal distribution.
RANPOI FunctionReturns a random variate from a Poisson distribution.
RANTBL FunctionReturns a random variate from a tabled probability distribution.
RANTRI FunctionReturns a random variate from a triangular distribution.
RANUNI FunctionReturns a random variate from a uniform distribution.
UNIFORM FunctionReturns a random variate from a uniform distribution.
SAS File I/OATTRC FunctionReturns the value of a character attribute for a SAS data set.
ATTRN FunctionReturns the value of a numeric attribute for a SAS data set.
CEXIST FunctionVerifies the existence of a SAS catalog or SAS catalog entry.
CLOSE FunctionCloses a SAS data set.
CUROBS FunctionReturns the observation number of the current observation.
DROPNOTE FunctionDeletes a note marker from a SAS data set or an external file.
DSNAME FunctionReturns the SAS data set name that is associated with a data set identifier.
ENVLEN FunctionReturns the length of an environment variable.
EXIST FunctionVerifies the existence of a SAS library member.
FCOPY FunctionCopies records from one fileref to another fileref, and returns a value that indicates whether the records were successfully copied.
FETCH FunctionReads the next non-deleted observation from a SAS data set into the Data Set Data Vector (DDV).
FETCHOBS FunctionReads a specified observation from a SAS data set into the Data Set Data Vector (DDV).
GETVARC FunctionReturns the value of a SAS data set character variable.
GETVARN FunctionReturns the value of a SAS data set numeric variable.
IORCMSG FunctionReturns a formatted error message for _IORC_.
LIBNAME FunctionAssigns or clears a libref for a SAS library.
LIBREF FunctionVerifies that a libref has been assigned.
NOTE FunctionReturns an observation ID for the current observation of a SAS data set.
OPEN FunctionOpens a SAS data set.
PATHNAME FunctionReturns the physical name of an external file or a SAS library, or returns a blank.
POINT FunctionLocates an observation that is identified by the NOTE function.
RENAME FunctionRenames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.
REWIND FunctionPositions the data set pointer at the beginning of a SAS data set.
SYSEXIST FunctionReturns a value that indicates whether an operating-environment variable exists in your environment.
SYSMSG FunctionReturns error or warning message text from processing the last data set or external file function.
SYSRC FunctionReturns a system error number.
VARFMT FunctionReturns the format that is assigned to a SAS data set variable.
VARINFMT FunctionReturns the informat that is assigned to a SAS data set variable.
VARLABEL FunctionReturns the label that is assigned to a SAS data set variable.
VARLEN FunctionReturns the length of a SAS data set variable.
VARNAME FunctionReturns the name of a SAS data set variable.
VARNUM FunctionReturns the number of a variable's position in a SAS data set.
VARTYPE FunctionReturns the data type of a SAS data set variable.
SearchWHICHC FunctionSearches for a character value that is equal to the first argument, and returns the index of the first matching value.
WHICHN FunctionSearches for a numeric value that is equal to the first argument, and returns the index of the first matching value.
SortCALL SORTC RoutineSorts the values of character arguments.
CALL SORTN RoutineSorts the values of numeric arguments.
SpecialADDR FunctionReturns the memory address of a variable on a 32-bit platform.
ADDRLONG FunctionReturns the memory address of a variable on 32-bit and 64-bit platforms.
CALL POKE RoutineWrites a value directly into memory on a 32-bit platform.
CALL POKELONG RoutineWrites a value directly into memory on 32-bit and 64-bit platforms.
CALL SLEEP RoutineFor a specified period of time, suspends the execution of a program that invokes this CALL routine.
CALL SYSTEM RoutineSubmits an operating environment command for execution.
DIF FunctionReturns differences between an argument and its nth lag.
FMTINFO FunctionRetrieves information about a format or informat.
INPUT FunctionReturns the value that is produced when SAS converts an expression by using the specified informat.
INPUTC FunctionEnables you to specify a character informat at run time.
INPUTN FunctionEnables you to specify a numeric informat at run time.
LAG FunctionReturns values from a queue.
PEEK FunctionStores the contents of a memory address in a numeric variable on a 32-bit platform.
PEEKC FunctionStores the contents of a memory address in a character variable on a 32-bit platform.
PEEKCLONG FunctionStores the contents of a memory address in a character variable on 32-bit and 64-bit platforms.
PEEKLONG FunctionStores the contents of a memory address in a numeric variable on 32-bit and 64-bit platforms.
PTRLONGADD FunctionReturns the pointer address as a character variable on 32-bit and 64-bit platforms.
PUTC FunctionEnables you to specify a character format at run time.
PUTN FunctionEnables you to specify a numeric format at run time.
PUT FunctionReturns a value using a specified format.
SLEEP FunctionSuspends the execution of a program that invokes this function for a period of time.
SYSEXIST FunctionReturns a value that indicates whether an operating-environment variable exists in your environment.
SYSGET FunctionReturns the value of the specified operating environment variable.
SYSPARM FunctionReturns the system parameter string.
SYSPROCESSID FunctionReturns the process ID of the current process.
SYSPROCESSNAME FunctionReturns the process name that is associated with a given process ID, or returns the name of the current process.
SYSPROD FunctionDetermines whether a product is licensed.
UUIDGEN FunctionReturns the short or binary form of a Universally Unique Identifier (UUID).
State and ZIP codeFIPNAME FunctionConverts two-digit FIPS codes to uppercase state names.
FIPNAMEL FunctionConverts two-digit FIPS codes to mixed case state names.
FIPSTATE FunctionConverts two-digit FIPS codes to two-character state postal codes.
STFIPS FunctionConverts state postal codes to FIPS state codes.
STNAME FunctionConverts state postal codes to uppercase state names.
STNAMEL FunctionConverts state postal codes to mixed case state names.
ZIPCITY FunctionReturns a city name and the two-character postal code that corresponds to a ZIP code.
ZIPCITYDISTANCE FunctionReturns the geodetic distance between two ZIP code locations.
ZIPFIPS FunctionConverts ZIP codes to two-digit FIPS codes.
ZIPNAME FunctionConverts ZIP codes to uppercase state names.
ZIPNAMEL FunctionConverts ZIP codes to mixed case state names.
ZIPSTATE FunctionConverts ZIP codes to two-character state postal codes.
TrigonometricARCOS FunctionReturns the arccosine.
ARSIN FunctionReturns the arcsine.
ATAN FunctionReturns the arc tangent.
ATAN2 FunctionReturns the arc tangent of the ratio of two numeric variables.
COS FunctionReturns the cosine.
COT FunctionReturns the cotangent.
CSC FunctionReturns the cosecant.
SEC FunctionReturns the secant.
SIN FunctionReturns the sine.
TAN FunctionReturns the tangent.
TruncationCEIL FunctionReturns the smallest integer that is greater than or equal to the argument, fuzzed to avoid unexpected floating-point results.
CEILZ FunctionReturns the smallest integer that is greater than or equal to the argument, using zero fuzzing.
FLOOR FunctionReturns the largest integer that is less than or equal to the argument, fuzzed to avoid unexpected floating-point results.
FLOORZ FunctionReturns the largest integer that is less than or equal to the argument, using zero fuzzing.
FUZZ FunctionReturns the nearest integer if the argument is within 1E−12 of that integer.
INT FunctionReturns the integer value, fuzzed to avoid unexpected floating-point results.
INTZ FunctionReturns the integer portion of the argument, using zero fuzzing.
ROUND FunctionRounds the first argument to the nearest multiple of the second argument, or to the nearest integer when the second argument is omitted.
ROUNDE FunctionRounds the first argument to the nearest multiple of the second argument, and returns an even multiple when the first argument is halfway between the two nearest multiples.
ROUNDZ FunctionRounds the first argument to the nearest multiple of the second argument, using zero fuzzing.
TRUNC FunctionTruncates a numeric value to a specified number of bytes.
Variable ControlCALL LABEL RoutineAssigns a variable label to a specified character variable.
CALL SET RoutineLinks SAS data set variables to DATA step or macro variables that have the same name and data type.
CALL VNAME RoutineAssigns a variable name as the value of a specified variable.
Variable InformationCALL VNEXT RoutineReturns the name, type, and length of a variable that is used in a DATA step.
VARRAY FunctionReturns a value that indicates whether the specified name is an array.
VARRAYX FunctionReturns a value that indicates whether the value of the specified argument is an array.
VFORMAT FunctionReturns the format that is associated with the specified variable.
VFORMATD FunctionReturns the decimal value of the format that is associated with the specified variable.
VFORMATDX FunctionReturns the decimal value of the format that is associated with the value of the specified argument.
VFORMATN FunctionReturns the format name that is associated with the specified variable.
VFORMATNX FunctionReturns the format name that is associated with the value of the specified argument.
VFORMATW FunctionReturns the format width that is associated with the specified variable.
VFORMATWX FunctionReturns the format width that is associated with the value of the specified argument.
VFORMATX FunctionReturns the format that is associated with the value of the specified argument.
VINARRAY FunctionReturns a value that indicates whether the specified variable is a member of an array.
VINARRAYX FunctionReturns a value that indicates whether the value of the specified argument is a member of an array.
VINFORMAT FunctionReturns the informat that is associated with the specified variable.
VINFORMATD FunctionReturns the decimal value of the informat that is associated with the specified variable.
VINFORMATDX FunctionReturns the decimal value of the informat that is associated with the value of the specified variable.
VINFORMATN FunctionReturns the informat name that is associated with the specified variable.
VINFORMATNX FunctionReturns the informat name that is associated with the value of the specified argument.
VINFORMATW FunctionReturns the informat width that is associated with the specified variable.
VINFORMATWX FunctionReturns the informat width that is associated with the value of the specified argument.
VINFORMATX FunctionReturns the informat that is associated with the value of the specified argument.
VLABEL FunctionReturns the label that is associated with the specified variable.
VLABELX FunctionReturns the label that is associated with the value of the specified argument.
VLENGTH FunctionReturns the compile-time (allocated) size of the specified variable.
VLENGTHX FunctionReturns the compile-time (allocated) size for the variable that has a name that is the same as the value of the argument.
VNAME FunctionReturns the name of the specified variable.
VNAMEX FunctionValidates the value of the specified argument as a variable name.
VTYPE FunctionReturns the type (character or numeric) of the specified variable.
VTYPEX FunctionReturns the type (character or numeric) for the value of the specified argument.
VVALUE FunctionReturns the formatted value that is associated with the variable that you specify.
VVALUEX FunctionReturns the formatted value that is associated with the argument that you specify.
Web ServiceSOAPWEB FunctionCalls a web service by using basic web authentication; credentials are provided in the arguments.
SOAPWEBMETA FunctionCalls a web service by using basic web authentication; credentials for the authentication domain are retrieved from metadata.
SOAPWIPSERVICE FunctionCalls a SAS registered web service by using WS-Security authentication; credentials are provided in the arguments.
SOAPWIPSRS FunctionCalls a SAS registered web service by using WS-Security authentication; credentials are provided in the arguments.
SOAPWS FunctionCalls a web service by using WS-Security authentication; credentials are provided in the arguments.
SOAPWSMETA FunctionCalls a web service by using WS-Security authentication; credentials for the provided authentication domain are retrieved from metadata.
Web ToolsHTMLDECODE FunctionDecodes a string that contains HTML numeric character references or HTML character entity references, and returns the decoded string.
HTMLENCODE FunctionEncodes characters using HTML character entity references, and returns the encoded string.
URLDECODE FunctionReturns a string that was decoded using the URL escape syntax.
URLENCODE FunctionReturns a string that was encoded using the URL escape syntax.
Last updated: March 16, 2017