Note: The %SYSFUNC and %QSYSFUNC macro functions enable you to use SAS
language functions with the macro processor. The %SYSCALL macro statement
enables you to use SAS language CALL routines with the macro processor. These
elements of the macro language are not considered true macro facility interfaces and
they are discussed in this section. For more information about these macro language
elements, see Chapter 12, “Macro Language Elements,” on page 157.
DATA Step Interfaces
Interacting with the Macro Facility during DATA Step Execution
DATA step interfaces consist of eight tools that enable a program to interact with the
macro facility during DATA step execution. Because the work of the macro facility takes
place before DATA step execution begins, information provided by macro statements has
already been processed during DATA step execution. You can use one of the DATA step
interfaces to interact with the macro facility during DATA step execution. You can use
DATA step interfaces to do the following:
• pass information from a DATA step to a subsequent step in a SAS program
• invoke a macro based on information available only when the DATA step executes
• resolve a macro variable while a DATA step executes
• delete a macro variable
• pass information about a macro variable from the macro facility to the DATA step
The following table lists the DATA step interfaces by category and their uses.
Table 8.1 DATA Step Interfaces to the Macro Facility
Category Tool Description
Execution CALL EXECUTE routine Resolves its argument and executes the
resolved value at the next step
boundary (if the value is a SAS
statement) or immediately (if the value
is a macro language element).
Resolution RESOLVE function Resolves the value of a text expression
during DATA step execution.
Deletion CALL SYMDEL routine Deletes the indicated macro variable
named in the argument.
Information SYMEXIST function Returns an indication as to whether the
macro variable exists.
Read or Write SYMGET function Returns the value of a macro variable
during DATA step execution.
Information SYMGLOBL function Returns an indication as to whether the
macro variable is global in scope.
104 Chapter 8 • Interfaces with the Macro Facility