<?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: To run multiple programs by a single code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659990#M197596</link>
    <description>&lt;P&gt;You can use one &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=p1s3uhhqtscz2sn1otiatbovfn1t.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;%INCLUDE&lt;/A&gt; statement by specifying the "aggregate storage location" (in this case, a directory) first:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename progdir "D:\Path";

%include progdir(pgm1,pgm2,pgm3,pgm4,pgm5);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that this will run the included codes in succession.&lt;/P&gt;
&lt;P&gt;If you want to run several SAS programs &lt;EM&gt;simultaneously&lt;/EM&gt;, you need to run several SAS sessions in parallel.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2020 10:36:23 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-06-16T10:36:23Z</dc:date>
    <item>
      <title>To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659987#M197593</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some 5 programs ,say for eg: pgm1.sas, pgm2.sas, pgm3.sas. etc which i am saving in the same location. let it be D:\Path.&lt;/P&gt;&lt;P&gt;Is there any way to use a&amp;nbsp; single %include statement to run all this programs at once?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659987#M197593</guid>
      <dc:creator>AKHILA</dc:creator>
      <dc:date>2020-06-16T10:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659988#M197594</link>
      <description>&lt;P&gt;With "at once" do you mean "in parallel"?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659988#M197594</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-16T10:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659989#M197595</link>
      <description>&lt;P&gt;I mean simply to run all 5 pgms parellel or one after other to get the 5 outputs.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659989#M197595</guid>
      <dc:creator>AKHILA</dc:creator>
      <dc:date>2020-06-16T10:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659990#M197596</link>
      <description>&lt;P&gt;You can use one &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=p1s3uhhqtscz2sn1otiatbovfn1t.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;%INCLUDE&lt;/A&gt; statement by specifying the "aggregate storage location" (in this case, a directory) first:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename progdir "D:\Path";

%include progdir(pgm1,pgm2,pgm3,pgm4,pgm5);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that this will run the included codes in succession.&lt;/P&gt;
&lt;P&gt;If you want to run several SAS programs &lt;EM&gt;simultaneously&lt;/EM&gt;, you need to run several SAS sessions in parallel.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659990#M197596</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-16T10:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659991#M197597</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename a ("c:/temp/a.sas" "c:/temp/b.sas");

%include a;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:36:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659991#M197597</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2020-06-16T10:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659992#M197598</link>
      <description>Instead of %include, you can use the batch file to run , please let me know if your sas session is in unix/linux</description>
      <pubDate>Tue, 16 Jun 2020 10:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659992#M197598</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-06-16T10:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659993#M197599</link>
      <description>&lt;P&gt;If what you're asking for here is not just a "dumed-down" version of your real problem then just having five %include statements is by far the easiest and easiest to maintain option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the real problem you want to solve is of higher complexity then please share.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659993#M197599</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-16T10:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659994#M197600</link>
      <description>&lt;P&gt;Thanks for the suggestion. but in future if i add more programs how can i dynamically add those without entering in %include statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please suggest some macros?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659994#M197600</guid>
      <dc:creator>AKHILA</dc:creator>
      <dc:date>2020-06-16T10:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659995#M197601</link>
      <description>&lt;P&gt;Maybe this is doing the trick:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=c:\temp;


filename sasfiles "&amp;amp;path";

data files;
 
 did=DOPEN("sasfiles");
 do i=1 to DNUM(did);
  name=dread(did,i);
  ext=SUBSTR(name,INDEX(name,".")+1);
  path="&amp;amp;path\" ||name ;
  if UPCASE(ext)="SAS" then do;
    output;
	call execute ("%include '"|| path  || "';");
    *put name= ext=;
	end;
 end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jun 2020 11:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659995#M197601</guid>
      <dc:creator>MCoopmans</dc:creator>
      <dc:date>2020-06-16T11:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659996#M197602</link>
      <description>&lt;P&gt;Does the order the programs are run make a difference? Or will any order work?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 11:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659996#M197602</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-16T11:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659998#M197603</link>
      <description>&lt;P&gt;any order is fine&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 11:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/659998#M197603</guid>
      <dc:creator>AKHILA</dc:creator>
      <dc:date>2020-06-16T11:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/660004#M197605</link>
      <description>Not sure if the following could work.&lt;BR /&gt;&lt;BR /&gt;%include "D:\Path\pgm*.sas" ;</description>
      <pubDate>Tue, 16 Jun 2020 11:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/660004#M197605</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-16T11:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: To run multiple programs by a single code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/660005#M197606</link>
      <description>&lt;P&gt;How do you add your programs? If you simply put them into a specific directory, and all programs in that directory need to be run, then&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/2909"&gt;@MCoopmans&lt;/a&gt;'s code will do the trick.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/234880"&gt;@AKHILA&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the suggestion. but in future if i add more programs how can i dynamically add those without entering in %include statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please suggest some macros?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 11:34:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-run-multiple-programs-by-a-single-code/m-p/660005#M197606</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-16T11:34:10Z</dc:date>
    </item>
  </channel>
</rss>

