Functions and CALL Routines |
Syntax of Functions |
The syntax of a function has one of the following forms:
function-name (argument-1<, ...argument-n>) |
function-name (OF variable-list) |
function-name (<argument | OF variable-list | OF array-name[*]><..., <argument | OF variable-list | OF array-name[*]>>) |
can be a variable name, constant, or any SAS expression, including another function. The number and type of arguments that SAS allows are described with individual functions. Multiple arguments are separated by a comma.
can be any form of a SAS variable list, including individual variable names. If more than one variable list appears, separate them with a space or with a comma and another OF.
Examples: |
names a currently defined array. Specifying an array with an asterisk as a subscript causes SAS to treat each element of the array as a separate argument.
The OF operator has been extended to accept temporary arrays. You can use temporary arrays in OF lists for most SAS functions just as you can use regular variable arrays, but there are some restrictions. For a list of these restrictions, see Using the OF Operator with Temporary Arrays.
Syntax of CALL Routines |
The syntax of a CALL routine has one of the following forms:
CALL routine-name (argument-1<, ...argument-n>); |
CALL routine-name (OF variable-list); |
CALL routine-name (argument-1 | OF variable-list-1 <, ...argument-n | OF variable-list-n>); |
can be a variable name, a constant, any SAS expression, an external module name, an array reference, or a function. Multiple arguments are separated by a comma. The number and type of arguments that are allowed are described with individual CALL routines in the dictionary section.
Examples: |
can be any form of a SAS variable list, including variable names. If more than one variable list appears, separate them with a space or with a comma and another OF.
Examples: |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.