<?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 Execute process flow multiple times in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466279#M30219</link>
    <description>&lt;P&gt;Hello everybody, I'm using sas enterprise guide and i need solve a problem of multiple executions of a flow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need execute a flow in meny times, that number is for each month from 2016-01 to now,&amp;nbsp; so i need a method for run it and it continue running repeatedly for every month.&lt;/P&gt;</description>
    <pubDate>Thu, 31 May 2018 05:52:44 GMT</pubDate>
    <dc:creator>warboled</dc:creator>
    <dc:date>2018-05-31T05:52:44Z</dc:date>
    <item>
      <title>Execute process flow multiple times</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466279#M30219</link>
      <description>&lt;P&gt;Hello everybody, I'm using sas enterprise guide and i need solve a problem of multiple executions of a flow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need execute a flow in meny times, that number is for each month from 2016-01 to now,&amp;nbsp; so i need a method for run it and it continue running repeatedly for every month.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 05:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466279#M30219</guid>
      <dc:creator>warboled</dc:creator>
      <dc:date>2018-05-31T05:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: warboled</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466293#M30220</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212866"&gt;@warboled&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I'm not aware of any method in EG which would allow you to loop over a flow multiple times programmatically.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a coding level:&lt;/P&gt;
&lt;P&gt;You could export all the code in the flow and copy this code into an EG code node, then wrap a macro around it and add a data step where you call the macro as many times as you like.&lt;/P&gt;
&lt;P&gt;Below a code sample to illustrate the approach. The code within macro &lt;EM&gt;loopy&lt;/EM&gt; is what you would copy from your current flow. You then would need to edit this code adding macro variable &amp;amp;rundate so you can pass in the month you process as parameter in the data step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro loopy(rundate);
  data inter;
    format var date9.;
    var=&amp;amp;rundate;
  run;

  proc append base=want data=inter;
  run;
%mend;

data _null_;
  process_date='01JAN2016'd;
  do while(process_date&amp;lt;intnx('month',today(),0,'b'));
    call execute('%loopy('||process_date||')');
    process_date=intnx('month',process_date,1,'b');
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 01:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466293#M30220</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-05-31T01:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Execute process flow multiple times</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466323#M30226</link>
      <description>&lt;P&gt;When posting, you were advised to use a descriptive subject line. Please do so in the future.&lt;/P&gt;
&lt;P&gt;I edited your question accordingly.&lt;/P&gt;
&lt;P&gt;Using just your&amp;nbsp;&lt;EM&gt;username&lt;/EM&gt; as the subject line is, ahem, not a very bright thing to do.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 05:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466323#M30226</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-31T05:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Execute process flow multiple times</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466326#M30227</link>
      <description>&lt;P&gt;Another solution:&lt;/P&gt;
&lt;P&gt;Export all code to a .sas file.&lt;/P&gt;
&lt;P&gt;In the program, retrieve necessary values from environment variables with %sysget.&lt;/P&gt;
&lt;P&gt;Then create a shell script that runs this program in a "for" loop and supplies the values in environment variables.&lt;/P&gt;
&lt;P&gt;This would be precursor work for later handover to a scheduling system.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 06:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execute-process-flow-multiple-times/m-p/466326#M30227</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-31T06:00:17Z</dc:date>
    </item>
  </channel>
</rss>

