- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Look at SASHELP.VMACRO
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
... or by SQL:
proc sql;
select * from dictionary.macros;
run;
Bart
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
... and:
%put _all_;
to see everything.
Bart
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, local variables only exist inside the macro, so you have to put it inside the macro definition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.