Previous Page | Next Page

Functions and CALL Routines

CALL SET Routine



Links SAS data set variables to DATA step or macro variables that have the same name and data type.
Category: Variable Control

Syntax
Arguments
Details
Examples
See Also

Syntax

CALL SET(data-set-id);

Arguments

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.


Examples

This example uses the CALL SET routine:


See Also

Functions:

FETCH Function

FETCHOBS Function

GETVARC Function

GETVARN Function

Previous Page | Next Page | Top of Page