<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Run multiple times macro and then see only last proc print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606840#M176294</link>
    <description>&lt;P&gt;Hello friends.&lt;/P&gt;
&lt;P&gt;I have a question please.&lt;/P&gt;
&lt;P&gt;Let's say that I have a sas program that&amp;nbsp; including a Macro.&lt;/P&gt;
&lt;P&gt;Within the macro there is a long program that create a summary data with&amp;nbsp;proc print(or proc report or proc tabulate).&lt;/P&gt;
&lt;P&gt;The problem is that I run all the macros together before I leave my work&amp;nbsp; and when I come back to the computer I see in the print screen only print of the last macro Run.&lt;/P&gt;
&lt;P&gt;What is the way to see proc prints that were created by all the macro runs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro RRR(x,y,z);&lt;/P&gt;
&lt;P&gt;long code.....&lt;/P&gt;
&lt;P&gt;proc print data=Summary_tbl&amp;nbsp; noobs;&lt;/P&gt;
&lt;P&gt;Run;&lt;/P&gt;
&lt;P&gt;%mend RRR;&lt;/P&gt;
&lt;P&gt;RRR(1,1,1);&lt;/P&gt;
&lt;P&gt;RRR(1,1,2);&lt;/P&gt;
&lt;P&gt;RRR(1,1,3);&lt;/P&gt;
&lt;P&gt;RRR(1,2,1);&lt;/P&gt;
&lt;P&gt;RRR(1,2,2);&lt;/P&gt;
&lt;P&gt;RRR(1,2,3);&lt;/P&gt;
&lt;P&gt;RRR(2,1,1);&lt;/P&gt;
&lt;P&gt;RRR(2,1,2);&lt;/P&gt;
&lt;P&gt;RRR(2,1,3);&lt;/P&gt;
&lt;P&gt;RRR(2,2,1);&lt;/P&gt;
&lt;P&gt;RRR(2,2,2);&lt;/P&gt;
&lt;P&gt;RRR(2,2,3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When It finish run all macros I see proc print of the last run only&amp;nbsp;RRR(2,2,3);&lt;/P&gt;
&lt;P&gt;What is the way to see proc prints that were created by all macros runs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Nov 2019 21:30:05 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2019-11-24T21:30:05Z</dc:date>
    <item>
      <title>Run multiple times macro and then see only last proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606840#M176294</link>
      <description>&lt;P&gt;Hello friends.&lt;/P&gt;
&lt;P&gt;I have a question please.&lt;/P&gt;
&lt;P&gt;Let's say that I have a sas program that&amp;nbsp; including a Macro.&lt;/P&gt;
&lt;P&gt;Within the macro there is a long program that create a summary data with&amp;nbsp;proc print(or proc report or proc tabulate).&lt;/P&gt;
&lt;P&gt;The problem is that I run all the macros together before I leave my work&amp;nbsp; and when I come back to the computer I see in the print screen only print of the last macro Run.&lt;/P&gt;
&lt;P&gt;What is the way to see proc prints that were created by all the macro runs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro RRR(x,y,z);&lt;/P&gt;
&lt;P&gt;long code.....&lt;/P&gt;
&lt;P&gt;proc print data=Summary_tbl&amp;nbsp; noobs;&lt;/P&gt;
&lt;P&gt;Run;&lt;/P&gt;
&lt;P&gt;%mend RRR;&lt;/P&gt;
&lt;P&gt;RRR(1,1,1);&lt;/P&gt;
&lt;P&gt;RRR(1,1,2);&lt;/P&gt;
&lt;P&gt;RRR(1,1,3);&lt;/P&gt;
&lt;P&gt;RRR(1,2,1);&lt;/P&gt;
&lt;P&gt;RRR(1,2,2);&lt;/P&gt;
&lt;P&gt;RRR(1,2,3);&lt;/P&gt;
&lt;P&gt;RRR(2,1,1);&lt;/P&gt;
&lt;P&gt;RRR(2,1,2);&lt;/P&gt;
&lt;P&gt;RRR(2,1,3);&lt;/P&gt;
&lt;P&gt;RRR(2,2,1);&lt;/P&gt;
&lt;P&gt;RRR(2,2,2);&lt;/P&gt;
&lt;P&gt;RRR(2,2,3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When It finish run all macros I see proc print of the last run only&amp;nbsp;RRR(2,2,3);&lt;/P&gt;
&lt;P&gt;What is the way to see proc prints that were created by all macros runs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 21:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606840#M176294</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-11-24T21:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple times macro and then see only last proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606850#M176295</link>
      <description>&lt;P&gt;It seems that there is a statement in the macro code to clear the print screen.&lt;/P&gt;
&lt;P&gt;You can either look for such a statement or post the code to get help or&lt;/P&gt;
&lt;P&gt;alternatively append all final data-sets (summary_tbl) and run the proc print on the accumulated data-set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What sas platform are you using?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 23:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606850#M176295</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-11-24T23:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple times macro and then see only last proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606852#M176296</link>
      <description>&lt;P&gt;You may consider redirecting the list output to a location which can be accessed once the macro execution is complete.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro RRR(x,y,z);

long code.....

proc printto  print="C:\temp\LSTLST_&amp;amp;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)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Nov 2019 23:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-multiple-times-macro-and-then-see-only-last-proc-print/m-p/606852#M176296</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2019-11-24T23:19:36Z</dc:date>
    </item>
  </channel>
</rss>

