| Functions and CALL Routines |
| Syntax of Functions |
The syntax of a function is
| function-name (argument-1<, ...argument-n>) |
| function-name (OF variable-list) |
| function-name (OF array-name{*}) |
names the function.
can be a variable name, constant, or any SAS expression, including another function. The number and kind of arguments that SAS allows are described with individual functions. Multiple arguments are separated by a comma.
| Tip: | If the value of an argument is invalid (for example, missing or outside the prescribed range), SAS writes a note to the log indicating that the argument is invalid, sets _ERROR_ to 1, and sets the result to a missing value. |
| Examples: |
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 in this way causes SAS to treat the array as a list of the variables instead of processing only one element of the array at a time.
| Examples: |
| Syntax of CALL Routines |
The syntax of a CALL routine is
| 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>); |
where
names a SAS CALL routine.
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 kind 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 © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.