<?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 Continue after errors in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43388#M8891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ERRORABEND will end the SAS session after an error, is this what is happening?&amp;nbsp; More often after an error SAS will go into syntax-check mode and set OBS=0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid this, you can use:&amp;nbsp; OPTIONS NOSYNTAXCHECK ;&amp;nbsp; at the top of your program code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Mar 2012 13:21:44 GMT</pubDate>
    <dc:creator>TimB_SAS</dc:creator>
    <dc:date>2012-03-27T13:21:44Z</dc:date>
    <item>
      <title>Continue after errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43386#M8889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a SAS batch script running under Windows with several steps. &lt;/P&gt;&lt;P&gt;Sometimes the first steps fail and it stops the entire script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to script to run from start to end regardless of any errors, any way of doing this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 17:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43386#M8889</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2012-03-26T17:16:51Z</dc:date>
    </item>
    <item>
      <title>Continue after errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43387#M8890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you check to see if the SAS option ERRORABEND is set (use PROC OPTIONS). If I remember correctly I think this is the default for batch programs. Try setting OPTIONS NOERRORABEND; at the top of your program - does this change the behaviour?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 05:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43387#M8890</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2012-03-27T05:04:25Z</dc:date>
    </item>
    <item>
      <title>Continue after errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43388#M8891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ERRORABEND will end the SAS session after an error, is this what is happening?&amp;nbsp; More often after an error SAS will go into syntax-check mode and set OBS=0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid this, you can use:&amp;nbsp; OPTIONS NOSYNTAXCHECK ;&amp;nbsp; at the top of your program code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 13:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43388#M8891</guid>
      <dc:creator>TimB_SAS</dc:creator>
      <dc:date>2012-03-27T13:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Continue after errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43389#M8892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The intent here is to have a final 'Final Status' step at the end of the batch job to email the results of this job to someone who cares.&amp;nbsp; These options will allow that step to execute.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &amp;amp;syserr value gets reset after the final data step starts, so what I did was capture the value prior to that point.&amp;nbsp; I can use this now to accurately report the status of the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interestingly, the value of syserr changed from 1012 right after the first data step to a value of 3 later on.&amp;nbsp; Any ideas why? That was strange, but still acceptable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;infile '~/notfound';&lt;/P&gt;&lt;P&gt;input missing 6.;&lt;/P&gt;&lt;P&gt;put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put syserr=&amp;amp;syserr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc contents data=work._all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put syserr=&amp;amp;syserr;&lt;/P&gt;&lt;P&gt;%let joberror=&amp;amp;syserr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options obs=1 nosyntaxcheck;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;put "Last error found was: &amp;amp;joberror";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 16:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Continue-after-errors/m-p/43389#M8892</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2013-06-28T16:47:00Z</dc:date>
    </item>
  </channel>
</rss>

