General Form of SAS Functions

Arguments, Variable Lists, Arrays

To use a SAS function, specify the function name followed by the function arguments, which are enclosed in parentheses.
General form, SAS function:
function-name(argument-1<,argument-n>);
where arguments can be
  • variables, mean(x,y,z)
  • constants, mean(456,502,612,498)
  • expressions, mean(37*2,192/5,mean(22,34,56))
Note:Even if the function does not require arguments, the function name must still be followed by parentheses (for example, function-name()).
When a function contains more than one argument, the arguments are usually separated by commas.
function-name(argument-1,argument-2,argument-n)
However, for some functions, variable lists and arrays can also ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition 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.