<?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: Run a program x times in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744760#M233361</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/376436"&gt;@dmarques1998&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 3 different programs, and I want to create a "program 0" that runs all the others programs. However, in the program 1, I want to run him to 36 different months, (i'm using a macro that change every month). Is it possible to run in program 0, 36 times one to each month? if yes, how?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could modify the macro to do the looping 36 times, or some arbitrary number of times that would be specified in the argument to the macro. You don't really need another macro to do this, although of course that works.&lt;/P&gt;</description>
    <pubDate>Mon, 31 May 2021 11:15:14 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-05-31T11:15:14Z</dc:date>
    <item>
      <title>Run a program x times</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744756#M233357</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 different programs, and I want to create a "program 0" that runs all the others programs. However, in the program 1, I want to run him to 36 different months, (i'm using a macro that change every month). Is it possible to run in program 0, 36 times one to each month? if yes, how?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 10:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744756#M233357</guid>
      <dc:creator>dmarques1998</dc:creator>
      <dc:date>2021-05-31T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Run a program x times</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744757#M233358</link>
      <description>&lt;P&gt;Try this shell code and adjust it to your needs:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro program0(month);
  %put ##&amp;amp;month.##;
  /*
    put code of your program here
  */
%mend;


%macro loop();
  %do m = 1 %to 36;
    %program0(&amp;amp;m.)
  %end;
%mend;

%loop()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 10:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744757#M233358</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2021-05-31T10:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Run a program x times</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744760#M233361</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/376436"&gt;@dmarques1998&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 3 different programs, and I want to create a "program 0" that runs all the others programs. However, in the program 1, I want to run him to 36 different months, (i'm using a macro that change every month). Is it possible to run in program 0, 36 times one to each month? if yes, how?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could modify the macro to do the looping 36 times, or some arbitrary number of times that would be specified in the argument to the macro. You don't really need another macro to do this, although of course that works.&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 11:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-a-program-x-times/m-p/744760#M233361</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-31T11:15:14Z</dc:date>
    </item>
  </channel>
</rss>

