Hi,
I'm new to SAS macros, but have been trying to follow the logics of the program that I have.
Apparently, the program itself is made up of macros, and it creates a lot of temporary variables.
My question is....can I use proc print to generate a report that shows the values of temporary variables? Normally, when I do proc print, and use the "VAR" statement, it only allows me to choose column names that are in the original dataset columns.
Thanks
Have you tried running the program with options mprint or mlogic set instead?
Otherwise you'll need to include some explicit %put &my_mvar at different stages to check what you need.
options mprint mlogic;
/*run your code*/
thank you for the reply, however, I am creating a new post to describe my problem at bit more clearly.
The simple version:
%put _user_;
That's a short-cut that displays all the macro variables you have created, but omits the automatic macro variables that the software creates for you. You don't get control like you would with a VAR statement in PROC PRINT.
If you want to see the automatic variables, you can use:
%put _automatic_;
Or if you just want all of them, there's:
%put _all_;
There are one or two more possibilities, but you're most likely looking for the first version (_user_).
Good luck.
thank you for the reply, however, I am creating a new post to describe my problem at bit more clearly.
Options symbolgen;
...is helpful too when you want the macro var resolution to go to your log without having to do %put statements.
thank you for the reply, however, I am creating a new post to describe my problem at bit more clearly.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.