<?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 Re: Multiple Macro Runs in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705976#M26307</link>
    <description>&lt;P&gt;Works:&lt;/P&gt;
&lt;PRE&gt; 73         %macro TestMacro (Test1=,Test2=,Num=);
 74         
 75         DATA WORK.TestDt&amp;amp;Num;
 76         Mean=MEAN(&amp;amp;Test1,&amp;amp;Test2);
 77         RUN;
 78         
 79         %mend TestMacro;
 80         
 81         %TestMacro (Test1=19,Test2=20,Num=1);
 
 NOTE: The data set WORK.TESTDT1 has 1 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 82         %TestMacro (Test1=16,Test2=19.8,Num=2);
 
 NOTE: The data set WORK.TESTDT2 has 1 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 83         %TestMacro (Test1=18.9,Test2=17.6,Num=3);
 
 NOTE: The data set WORK.TESTDT3 has 1 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;Please post your log, using the &amp;lt;/&amp;gt; button as I did.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 10:08:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-12-15T10:08:02Z</dc:date>
    <item>
      <title>Multiple Macro Runs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705966#M26298</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run a macro with two variables Test1 and Test2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro TestMacro (Test1=,Test2=,Num=);

DATA WORK.TestDt&amp;amp;Num;
Mean=MEAN(&amp;amp;Test1,&amp;amp;Test2);
RUN;

%mend TestMacro;

%TestMacro (Test1=19,Test2=20,Num=1);
%TestMacro (Test1=16,Test2=19.8,Num=2);
%TestMacro (Test1=18.9,Test2=17.6,Num=3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It works fine when I only run it once. However, the macro stops after the first run, even though there are two left that I included at the same time. I don't know if that is what is supposed to happen, or if I haven't figured out how to run multiple macros at the same time yet. Clarification would be great!&lt;/P&gt;&lt;P&gt;Thanks y'all&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 09:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705966#M26298</guid>
      <dc:creator>GallagherML</dc:creator>
      <dc:date>2020-12-15T09:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Macro Runs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705970#M26302</link>
      <description>&lt;P&gt;Works for me without errors. Post your log please?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 09:43:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705970#M26302</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-12-15T09:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Macro Runs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705976#M26307</link>
      <description>&lt;P&gt;Works:&lt;/P&gt;
&lt;PRE&gt; 73         %macro TestMacro (Test1=,Test2=,Num=);
 74         
 75         DATA WORK.TestDt&amp;amp;Num;
 76         Mean=MEAN(&amp;amp;Test1,&amp;amp;Test2);
 77         RUN;
 78         
 79         %mend TestMacro;
 80         
 81         %TestMacro (Test1=19,Test2=20,Num=1);
 
 NOTE: The data set WORK.TESTDT1 has 1 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 82         %TestMacro (Test1=16,Test2=19.8,Num=2);
 
 NOTE: The data set WORK.TESTDT2 has 1 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 83         %TestMacro (Test1=18.9,Test2=17.6,Num=3);
 
 NOTE: The data set WORK.TESTDT3 has 1 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;Please post your log, using the &amp;lt;/&amp;gt; button as I did.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 10:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/705976#M26307</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-15T10:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Macro Runs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/706038#M26320</link>
      <description>&lt;P&gt;You might be looking in the wrong place.&amp;nbsp; The data set TestDt1 never changes.&amp;nbsp; The second run creates TestDt2, it doesn't replace TestDt1.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 14:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/706038#M26320</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-12-15T14:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Macro Runs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/706158#M26328</link>
      <description>&lt;P&gt;The code you posted seems to be working fine for me and I don't see anything in the code to suggest it wouldn't work. Did you get any warnings or errors in your log?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 23:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/706158#M26328</guid>
      <dc:creator>hswdl01</dc:creator>
      <dc:date>2020-12-15T23:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Macro Runs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/706209#M26332</link>
      <description>&lt;P&gt;The code worked for me, just make sure that you're checking the dropdown menu under output (if you are on Studio, not sure how this works for other versions). Or, you could include a PROC PRINT in the macro, and then it should print all 3 means as different tables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 04:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Multiple-Macro-Runs/m-p/706209#M26332</guid>
      <dc:creator>sdevenny</dc:creator>
      <dc:date>2020-12-16T04:57:28Z</dc:date>
    </item>
  </channel>
</rss>

