Hello friends.
I have a question please.
Let's say that I have a sas program that including a Macro.
Within the macro there is a long program that create a summary data with proc print(or proc report or proc tabulate).
The problem is that I run all the macros together before I leave my work and when I come back to the computer I see in the print screen only print of the last macro Run.
What is the way to see proc prints that were created by all the macro runs?
%macro RRR(x,y,z);
long code.....
proc print data=Summary_tbl noobs;
Run;
%mend RRR;
RRR(1,1,1);
RRR(1,1,2);
RRR(1,1,3);
RRR(1,2,1);
RRR(1,2,2);
RRR(1,2,3);
RRR(2,1,1);
RRR(2,1,2);
RRR(2,1,3);
RRR(2,2,1);
RRR(2,2,2);
RRR(2,2,3);
When It finish run all macros I see proc print of the last run only RRR(2,2,3);
What is the way to see proc prints that were created by all macros runs?
It seems that there is a statement in the macro code to clear the print screen.
You can either look for such a statement or post the code to get help or
alternatively append all final data-sets (summary_tbl) and run the proc print on the accumulated data-set.
What sas platform are you using?
You may consider redirecting the list output to a location which can be accessed once the macro execution is complete.
%macro RRR(x,y,z);
long code.....
proc printto print="C:\temp\LSTLST_&x..lst" new;
run;
proc print data=Summary_tbl noobs;
Run;
PROC PRINTTO; *The second PROC PRINTTO step redirects output back to its default destination.;
run;
%mend RRR;
RRR(1,1,1)
RRR(1,1,2)
RRR(1,1,3)
RRR(1,2,1)
RRR(1,2,2)
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!
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.