<?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: How do I tell SAS to WAIT before starting the next process/program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791560#M253570</link>
    <description>&lt;P&gt;Write a shell scripts that runs all SAS subjobs in the background and waits for them with the wait command. When you run this script from the main SAS program, the termination of the script will mean that all subjobs have finished.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 18:34:44 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-01-21T18:34:44Z</dc:date>
    <item>
      <title>How do I tell SAS to WAIT before starting the next process/program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791554#M253564</link>
      <description>&lt;P&gt;Hi All.,&lt;/P&gt;
&lt;P&gt;I am using SAS on Linux platform. I do not have SAS Connect or any other SAS Upgrades(Have basic SAS license).&lt;/P&gt;
&lt;P&gt;I am having a situation., while running a SAS Program which spawns out 20 parallel jobs. Each of those parallel jobs have their own run times. Outputs from those parallel jobs should be appended at the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two solutions:&lt;/P&gt;
&lt;P&gt;1) Create a new SAS program and append all the datasets in this program separately (Not efficient for a simple task of appending)&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;2) Ask SAS to "WAIT" until all the parallel jobs are completed and then append in the same program. But the catch here is, we do not know when the parallel jobs would be completed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So how would we tell SAS to WAIT until all the parallel jobs are completed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Prad&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791554#M253564</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2022-01-21T18:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell SAS to WAIT before starting the next process/program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791559#M253569</link>
      <description>How are you spawning your 20 parallel jobs?</description>
      <pubDate>Fri, 21 Jan 2022 18:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791559#M253569</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-21T18:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell SAS to WAIT before starting the next process/program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791560#M253570</link>
      <description>&lt;P&gt;Write a shell scripts that runs all SAS subjobs in the background and waits for them with the wait command. When you run this script from the main SAS program, the termination of the script will mean that all subjobs have finished.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791560#M253570</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-01-21T18:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell SAS to WAIT before starting the next process/program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791564#M253573</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are using the SYSTASK (&lt;A title="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/p0lzxl2mwndagun1dtxbst9s4jea.htm" href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/p0lzxl2mwndagun1dtxbst9s4jea.htm" target="_self"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/p0lzxl2mwndagun1dtxbst9s4jea.htm&lt;/A&gt;) statement to invoke parallel session each session gets can get its unique ID and you can ask SAS to wait for all listed IDs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my micro-tutorial of how to work with systask:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/Parallel-processing-in-BASE-SAS.sas" target="_blank"&gt;https://pages.mini.pw.edu.pl/~jablonskib/SASpublic/Parallel-processing-in-BASE-SAS.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791564#M253573</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2022-01-21T18:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell SAS to WAIT before starting the next process/program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791665#M253618</link>
      <description>&lt;P&gt;&amp;nbsp;A relatively new solution to this problem would be &lt;A href="https://github.com/sasjs/server" target="_self"&gt;sasjs/server&lt;/A&gt; - this provides a REST API over Foundation SAS, and would let you spawn jobs using any third party programming language (or, of course, SAS)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Disclaimer - my team built this tool, and there are still some upgrades needed on the security side (as of 22nd Jan 2022) to make it suitable for server (as opposed to desktop) use.&amp;nbsp; You can track progress in the github (security issues will be resolved from v1) or engage our team here: &lt;A href="https://sasapps.io" target="_blank"&gt;https://sasapps.io&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here's a video of building a react app with sasjs/server, sasjs/adapter, sasjs/cli, and sasjs/core:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=F23j0R2RxSA" target="_blank"&gt;https://www.youtube.com/watch?v=F23j0R2RxSA&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 20:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-tell-SAS-to-WAIT-before-starting-the-next-process/m-p/791665#M253618</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-01-22T20:32:46Z</dc:date>
    </item>
  </channel>
</rss>

