Reputation: 28411
It would be nice to know how to reference the macro variables in other tasks/code nodes.
Upvotes: 0
Views: 2930
Reputation: 28411
Once the prompt has been executed, you can see declared macro variables, in the log, by executing the %Put statement (in a program/code node):
%put _all_; %* Lists the values of all user-generated and automatic macro vars ;
%put _automatic_; %* SAS macro vars. Depend on SAS version and products installed;
%put _global_; %* lists user-generated global macro vars;
%put _local_; %* lists user-generated local macro vars;
%put _user_; %* describes user-generated global and local macro vars ;
However, EG (ver 4.3 and 4.2) has an easy way to view the macro vars that are created by a prompt (which comes in handy when the prompt is a range type and creates multiple macro vars)
Upvotes: 3
Reputation: 1696
You could take a snapshot of SASHELP.VMACRO (macro variable dictionary table):
data macs;
set sashelp.vmacro;
run;
This can be handy if, for example, you want to compare the macro variables present at one point in a process versus those present at another point:
data macs_before;
set sashelp.vmacro;
run;
...
... /* Other stuff here... */
...
data macs_after;
set sashelp.vmacro;
run;
Upvotes: 1