05-08-2012 01:29 PM
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.
05-08-2012 01:31 PM
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*/
05-08-2012 02:43 PM
The simple version:
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:
Or if you just want all of them, there's:
There are one or two more possibilities, but you're most likely looking for the first version (_user_).