Like other computer languages, SAS has numerous Functions that can be used in expressions. Most functions return a value based on the function's input parameters, although some functions do not need parameters but instead return a value for a particular measure, based on the sate of the measure at the time the function was called.
For a list of functions, see Index (Functions).
- function-name ( <parameters> )
Most of the functions in SAS are only directly available in the DATA Step. Some functions are available in various procedures and some procedures, such as the SQL procedure, have functions with the same name that operate in a different way in the procedure than in the DATA Step.
Creating user defined functions
The FCMP procedure can be used to create user defined functions.
- Index (Functions)
- Macro functions
- FCMP procedure
- Basic SAS Functions in Version 8.2
- Functioning with Data Step Functions
- Introduction to SAS Functions
- Introduction to Character String Functions