<?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 to automatically halt the SAS program if detecting the error message on log window in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530821#M145184</link>
    <description>&lt;P&gt;This feature has only been requested over 20 years, so it may come one day,&lt;/P&gt;
&lt;P&gt;In the meantime, &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Create-new-statement-STOPROGRAMRIGHTHERE-or-similar/idi-p/332062" target="_self"&gt;the link to a workaround in this page&lt;/A&gt;&amp;nbsp;may help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 23:29:51 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-01-28T23:29:51Z</dc:date>
    <item>
      <title>how to automatically halt the SAS program if detecting the error message on log window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530726#M145148</link>
      <description>&lt;P&gt;Hello SAS guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could somebody help me out? When running SAS program, if there is any error message showing on the log window, SAS program halt immediately.&amp;nbsp; How to write code to get the result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 19:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530726#M145148</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2019-01-28T19:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to automatically halt the SAS program if detecting the error message on log window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530735#M145151</link>
      <description>&lt;P&gt;Call this simple macro before each program&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro runquit;
 ; run; quit;
 %if &amp;amp;syserr. ne 0 %then %do;
 %abort cancel;
 %end;
%mend runquit;

&amp;lt; program 1&amp;gt;
%runquit;
&amp;lt; program 2&amp;gt;
%runquit;
&amp;lt; program 3&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Jan 2019 19:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530735#M145151</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-01-28T19:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to automatically halt the SAS program if detecting the error message on log window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530736#M145152</link>
      <description>&lt;P&gt;The SAS option that is closest to your requirement is SYNTAXCHECK. If you put this option in an OPTIONS statement then SAS will go into syntax check mode as soon as there is an error. Your program will still run to completion but it wont do any more processing as it sets zero observations to be processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is another option ERRORABEND. This will close your SAS session when an error occurs. This option is more useful for batch jobs as while execution halts, it also closes your batch session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not a fan of adding generic process checking code to programs. I would rather rely on simple SAS system options which will automatically handle any job errors in an appropriate way.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 21:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530736#M145152</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-01-28T21:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to automatically halt the SAS program if detecting the error message on log window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530821#M145184</link>
      <description>&lt;P&gt;This feature has only been requested over 20 years, so it may come one day,&lt;/P&gt;
&lt;P&gt;In the meantime, &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Create-new-statement-STOPROGRAMRIGHTHERE-or-similar/idi-p/332062" target="_self"&gt;the link to a workaround in this page&lt;/A&gt;&amp;nbsp;may help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 23:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-automatically-halt-the-SAS-program-if-detecting-the-error/m-p/530821#M145184</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-01-28T23:29:51Z</dc:date>
    </item>
  </channel>
</rss>

