<?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: don't run next step if previous step gets any error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585392#M75791</link>
    <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/td-p/43386" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/td-p/43386&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid this see the nosyntaxcheck option.&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2019 05:53:06 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2019-08-31T05:53:06Z</dc:date>
    <item>
      <title>don't run next step if previous step gets any error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585387#M75790</link>
      <description>&lt;P&gt;%macro test1;&lt;BR /&gt;data ex1 ;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;where sex='F' &lt;BR /&gt;run;&lt;BR /&gt;%mend ;&lt;/P&gt;
&lt;P&gt;%macro test2;&lt;BR /&gt;data ex2 ;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;where sex='M' ;&lt;BR /&gt;run;&lt;BR /&gt;%mend ;&lt;/P&gt;
&lt;P&gt;%test1;&lt;BR /&gt;%test2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote two macro applications If i run the 2 macro applications don't run second application because there is one syntax error in the&lt;/P&gt;
&lt;P&gt;first macro application.&lt;/P&gt;
&lt;P&gt;Note: If any error in the step don't run the next step&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 05:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585387#M75790</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2019-08-31T05:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: don't run next step if previous step gets any error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585392#M75791</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/td-p/43386" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/td-p/43386&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid this see the nosyntaxcheck option.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 05:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585392#M75791</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2019-08-31T05:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: don't run next step if previous step gets any error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585395#M75792</link>
      <description>&lt;P&gt;Since 9.4M5, you can use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if
%then %do;
.......
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in open code. Use the automatic variable &amp;amp;syscc to determine the current error (return code) status of your SAS session. Hint: you can reset &amp;amp;syscc yourself:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let syscc=0;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 07:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585395#M75792</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-31T07:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: don't run next step if previous step gets any error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585398#M75793</link>
      <description>Not only syntax error if anytype of error comes in first step don't run&lt;BR /&gt;second step&lt;BR /&gt;</description>
      <pubDate>Sat, 31 Aug 2019 08:24:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585398#M75793</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2019-08-31T08:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: don't run next step if previous step gets any error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585430#M75794</link>
      <description>&lt;P&gt;How are you running your program?&lt;/P&gt;
&lt;P&gt;If you are just submitting the program from the command line then try just setting the ERRORABEND option and SAS will stop on the first error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note this doesn't work well if you are using some type of interactive process to run your SAs code.&amp;nbsp; Such as Enterprise Guide or SAS/Studio of SAS Display Manager.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 19:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/don-t-run-next-step-if-previous-step-gets-any-error/m-p/585430#M75794</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-31T19:43:13Z</dc:date>
    </item>
  </channel>
</rss>

