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.
Syntax, DOSUBL ... |
Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.