Previous Page | Next Page

Macro Language Elements

Interfaces with the Macro Facility

The DATA step, the SAS Component Language, and the SQL procedure provide interfaces with the macro facility. The following tables list the elements that interact with the SAS macro facility.

The DATA step provides elements that enable a program to interact with the macro facility during DATA step execution.

Interfaces to the DATA Steps
Element Description
EXECUTE routine resolves an argument and executes the resolved value at the next step boundary.
RESOLVE function resolves the value of a text expression during DATA step execution.
SYMDEL routine deletes the indicated macro variable named in the argument.
SYMEXIST function returns an indication as to whether the named macro variable exists.
SYMGET function returns the value of a macro variable to the DATA step during DATA step execution.
SYMGLOBL function returns an indication as to whether the named macro variable is global in scope.
SYMLOCAL function returns an indication as to whether the named macro variable is local in scope.
SYMPUT routine assigns a value produced in a DATA step to a macro variable.

The SAS Component Language (SCL) provides two elements for using the SAS macro facility to define macros and macro variables for SCL programs.

Interfaces to the SAS Component Language
Element Description
SYMGETN returns the value of a global macro variable as a numeric value.
SYMPUTN assigns a numeric value to a global macro variable.

The SQL procedure provides a feature for creating and updating macro variables with values produced by the SQL procedure.

Interfaces to the SQL Procedure
Element Description
INTO assigns the result of a calculation or the value of a data column.

For more information, see Interfaces with the Macro Facility.

Previous Page | Next Page | Top of Page