<?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: Running multiple SAS Programs via batch on linux in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468372#M285439</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214209"&gt;@TobiasGrossmann&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;An %include statement allows you to include SAS code kept in another file BUT the code gets run as if all this code would directly "live" in the place where you've got the %include statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this reason organizing code in multiple files and then bringing it together with %include statements, runs the all the code as one big single programs and for this reason you should have all the tables accessible within the same session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't matter if you run the master program (with the %includes in it) in batch or in an interactive session. It's still: All the code is together so everything should be available to all the bits as long as the session is active.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 14:17:02 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-06-07T14:17:02Z</dc:date>
    <item>
      <title>Running multiple SAS Programs via batch on linux</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468358#M285437</link>
      <description>&lt;P&gt;Hi SAS Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to run mutliple SAS programs in a Batch after each other and Re-Use all the results from the previous executed programs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why: I start with an EGP Project, nicely ordering the code in diffrent programs, and then export everything to *.sas files to get a batch ready enviroment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To run the diffrent programs I created a SAS macro, in the hope it will keep the Session, unfortiantly, it doestn seems to work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run.sas :&lt;/P&gt;&lt;P&gt;%let basepath = /srv/sas/projects/cirun/fwd;&lt;BR /&gt;%let projectname = /myprojectfiles/;&lt;BR /&gt;run;&lt;BR /&gt;%include "&amp;amp;basepath.&amp;amp;projectname.build/00a_init.sas";&lt;BR /&gt;run;&lt;BR /&gt;%include "&amp;amp;basepath.&amp;amp;projectname.build/01a_load_akq.sas";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and ongoing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 13:25:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468358#M285437</guid>
      <dc:creator>TobiasGrossmann</dc:creator>
      <dc:date>2018-06-07T13:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple SAS Programs via batch on linux</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468363#M285438</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;Batch after each other and Re-Use all the results from the previous executed programs." - If you have several programs that all use the same output, then link them in one overall file, batch submit the overall file, and they can then include all the sub programs - i.e. one session lots of programs being run.&amp;nbsp; Not much point in starting a new session for each program, as you then need to start up and close SAS each, and store outputs to a physical location for the next part of the process.&amp;nbsp; So unless there is a really good reason, 1 session, which runs all your code would be better.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 13:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468363#M285438</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-07T13:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple SAS Programs via batch on linux</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468372#M285439</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214209"&gt;@TobiasGrossmann&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;An %include statement allows you to include SAS code kept in another file BUT the code gets run as if all this code would directly "live" in the place where you've got the %include statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this reason organizing code in multiple files and then bringing it together with %include statements, runs the all the code as one big single programs and for this reason you should have all the tables accessible within the same session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't matter if you run the master program (with the %includes in it) in batch or in an interactive session. It's still: All the code is together so everything should be available to all the bits as long as the session is active.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/468372#M285439</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-07T14:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple SAS Programs via batch on linux</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/469685#M285440</link>
      <description>&lt;P&gt;thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 17:07:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-multiple-SAS-Programs-via-batch-on-linux/m-p/469685#M285440</guid>
      <dc:creator>TobiasGrossmann</dc:creator>
      <dc:date>2018-06-12T17:07:21Z</dc:date>
    </item>
  </channel>
</rss>

