Data-Driven Macro Calls
You can create
data-driven macro calls using the DOSUBL DATA step function.
A Brief Overview
The DOSUBL function
enables the immediate execution of SAS code after a text string is
passed. Macro variables that are created or updated during the execution
of the submitted code are exported back to the calling environment.
DOSUBL returns a value
of 0 if SAS code was able to execute,
and returns a nonzero value if SAS code was not able to execute.
DOSUBL should be used
in a DATA step. It can also be used with %SYSFUNC outside a step boundary.
The DOSUBL Function
The DOSUBL function imports macro
variables from the calling environment, and exports macro variables
back to the calling environment.