Usage Note 23182: Why doesn't the macro variable I created with CALL SYMPUT resolve?
One of the most common problems to occur when using a
macro variable created with SYMPUT is trying to
reference it before it is actually created. When creating
a macro variable with CALL SYMPUT, one of the most
important things to know is when the variable is created.
CALL SYMPUT is a DATA step statement, so it does not create the macro variable until DATA step execution time.
This is important because macro variable references
resolve during the compilation of the DATA step.
As a result, the following rules are true:
-
You cannot use a macro variable reference to retrieve
the value of a macro variable in the same program (or step)
in which SYMPUT creates that macro variable and assigns it a value.
- You must explicitly use a step boundary statement to
force the DATA step to execute before referencing the
macro variable created with SYMPUT. The boundary could be a
RUN statement or another DATA or PROC statement.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Date Modified: | 2003-02-25 20:36:19 |
Date Created: | 2003-02-20 11:09:32 |