Definitions of Functions and CALL Routines

A function is a component of the SAS programming language that can accept arguments, perform a computation or other operation, and return a value. Functions return either numeric or character results. The value that is returned can be used in an assignment statement or elsewhere in expressions. Many functions are included with SAS, and you can write your own functions as well.
Functions are used in DATA step programming statements, in a WHERE expression, in macro language statements, in PROC REPORT, and in Structured Query Language (SQL).
Some statistical procedures also use functions. In addition, some SAS software products offer functions that you can use in the DATA step. For more information about these functions, see the documentation for the specific SAS software product.
A CALL routine alters variable values or performs other system functions. CALL routines are similar to functions, but differ from functions in that you cannot use them in assignment statements or expressions.
All SAS CALL routines are invoked with CALL statements. That is, the name of the routine must appear after the keyword CALL in the CALL statement.
Last updated: March 16, 2017