<?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: Unix Module to run SAS porgrams in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/372684#M89150</link>
    <description>&lt;P&gt;Thank you for you replies,really helpful.&amp;nbsp;In the UNIX Script. create a&amp;nbsp;loop to test the sas program is fail or success. If Fail sleep for a minute to check error. Script will rerun until success then go to next sas progran.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;f=sasprogram
for f in saslist
	do
		sas sasdirectory/$f -log /sas_log/$f.$date.log
		until [ $? -eq 0 ];
		do
		  echo "Processing $f: job fail...\n"
		  echo "Please see error details" /sas_log/$f.$date.log
		  sleep 60 *1 minute
		  sas $sas_dir/$f -log $sas_log/$f.$dateparm.log
		done
		"Processing $f: job success...\n" 
	done
exit 0&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Jul 2017 10:04:13 GMT</pubDate>
    <dc:creator>tunnii</dc:creator>
    <dc:date>2017-07-03T10:04:13Z</dc:date>
    <item>
      <title>Unix Module to run SAS porgrams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/370842#M88558</link>
      <description>&lt;P&gt;Hi, please help me create a UNIX module to run and rerun sas programs dependently. If sample1.sas fails will rerun and not continue will sample2.sas and sample3.sas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 08:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/370842#M88558</guid>
      <dc:creator>tunnii</dc:creator>
      <dc:date>2017-06-27T08:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Module to run SAS porgrams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/370847#M88561</link>
      <description>&lt;P&gt;Look at the conditional operators in UNIX shells:&lt;/P&gt;
&lt;PRE&gt;command1 &amp;amp;&amp;amp; command2&lt;/PRE&gt;
&lt;P&gt;means that command2 will only be run if command1 succeeds&lt;/P&gt;
&lt;PRE&gt;command1 &amp;amp;&amp;amp; command2 || command3&lt;/PRE&gt;
&lt;P&gt;if command1 succeeds, run command2, else run command3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for loop structures in UNIX shells, see&amp;nbsp;&lt;A href="https://www.tutorialspoint.com/unix/unix-shell-loops.htm" target="_blank"&gt;https://www.tutorialspoint.com/unix/unix-shell-loops.htm&lt;/A&gt;. You'll also find lots of other information for shell scripoting on that website.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 09:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/370847#M88561</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-27T09:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Module to run SAS porgrams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/370855#M88562</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/147850"&gt;@tunnii&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I'd use a scheduler like LSF for a production system. Enterprise grade schedulers are built for handling such dependencies.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 09:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/370855#M88562</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-06-27T09:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Module to run SAS porgrams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/372684#M89150</link>
      <description>&lt;P&gt;Thank you for you replies,really helpful.&amp;nbsp;In the UNIX Script. create a&amp;nbsp;loop to test the sas program is fail or success. If Fail sleep for a minute to check error. Script will rerun until success then go to next sas progran.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;f=sasprogram
for f in saslist
	do
		sas sasdirectory/$f -log /sas_log/$f.$date.log
		until [ $? -eq 0 ];
		do
		  echo "Processing $f: job fail...\n"
		  echo "Please see error details" /sas_log/$f.$date.log
		  sleep 60 *1 minute
		  sas $sas_dir/$f -log $sas_log/$f.$dateparm.log
		done
		"Processing $f: job success...\n" 
	done
exit 0&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jul 2017 10:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/372684#M89150</guid>
      <dc:creator>tunnii</dc:creator>
      <dc:date>2017-07-03T10:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Module to run SAS porgrams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/372723#M89162</link>
      <description>&lt;P&gt;I'd add a failsafe that exits with a non-zero return code after a certain number of repeats, to avoid an infinite loop.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 12:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unix-Module-to-run-SAS-porgrams/m-p/372723#M89162</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-03T12:51:06Z</dc:date>
    </item>
  </channel>
</rss>

