CALL SET Routine

Syntax

Required Argument

data-set-id

is the identifier that
is assigned by the OPEN function when the data set is opened.

Details

Using SET can significantly
reduce the coding that is required for accessing variable values for
modification or verification when you use functions to read or to
manipulate a SAS file. After a CALL SET, whenever a read is performed
from the SAS data set, the values of the corresponding macro or DATA
step variables are set to the values of the matching SAS data set
variables. If the variable lengths do not match, the values are truncated
or padded according to need. If you do not use SET, then you must
use the GETVARC and GETVARN functions to move values explicitly between
data set variables and macro or DATA step variables.

As a general rule, use
CALL SET immediately following OPEN if you want to link the data set
and the macro and DATA step variables.

Example: Using the CALL SET Routine

This example uses the
CALL SET routine:

The following statements automatically
set the values of the macro variables PRICE and STYLE when an observation
is fetched: