Hello.
Is there a quick way to view the Global or Local Symbol Table(s)? I wish to see my current macro variables.
Thank you in advance.
Look at SASHELP.VMACRO
... or by SQL:
proc sql;
select * from dictionary.macros;
run;
Bart
You just submit
%put _user_;
to see the macro variables that you yourself have created, and
%put _automatic_;
To see the system generated macro variables.
Inside a macro you can use
%put _local_;
to see locally defined macros, and
%put _global_;
to see globally defined macro variables.
... and:
%put _all_;
to see everything.
Bart
I tried
%put _all_; and
%put _local_;
My local variables symbol tables are not being displayed.
Does the %put _all_; and %put _local_; have to be inside the macro definition for it to be displayed in the log?
Yes, local variables only exist inside the macro, so you have to put it inside the macro definition.
thank you
Go with Maxim 1:
Read
1) here (whole branch): https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n10i4tmalsyhgxn1hj4ud13ff074.htm
2) here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0ivgabci0y2den1usf43mxdkpgp.htm
and
3) here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1lhhti7fjxgb1n1fuiubqk11h4d.htm
Bart
@yabwon wrote:
Go with Maxim 1:
Read
1) here (whole branch): https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n10i4tmalsyhgxn1hj4ud13ff074.htm
2) here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0ivgabci0y2den1usf43mxdkpgp.htm
and
3) here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1lhhti7fjxgb1n1fuiubqk11h4d.htm
Bart
Thank you for your input.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.