<?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 Error Handling in SAS EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337464#M22429</link>
    <description>&lt;DIV&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on SAS Enterprise 4.3&lt;/P&gt;&lt;P&gt;I have various programs on a project , my requirement is that as soon as there is an error in any of the program , then the sas processing is stopped and i need to capture the error and mail it to the user who is running the project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would also like to share my thoughts regarding solutions:&lt;/P&gt;&lt;P&gt;a) use options errorabend , but this disconnects the user from the server and log is also lost , for which i saved log at a particular location and was able to scan for error and error message but since user is disconnected &amp;nbsp;he/she will have to connect and run that code which is not feasible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) creating three macros:&lt;/P&gt;&lt;P&gt;1) if &amp;amp;syserr &amp;gt; 0 then %put : &amp;amp;syserrtxt&lt;/P&gt;&lt;P&gt;2) create a macro for mail-successful and unsucessful run as per syserr&lt;/P&gt;&lt;P&gt;3) abort program again as per &amp;amp;syserr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue with the above aproach is that my codes in individual programs are huge and will have to call this macro again and again in between the codes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;c) I am not sure if i can sue conditional processing , if yes then How?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-footer"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 02 Mar 2017 17:20:44 GMT</pubDate>
    <dc:creator>rbatra</dc:creator>
    <dc:date>2017-03-02T17:20:44Z</dc:date>
    <item>
      <title>Error Handling in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337464#M22429</link>
      <description>&lt;DIV&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on SAS Enterprise 4.3&lt;/P&gt;&lt;P&gt;I have various programs on a project , my requirement is that as soon as there is an error in any of the program , then the sas processing is stopped and i need to capture the error and mail it to the user who is running the project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would also like to share my thoughts regarding solutions:&lt;/P&gt;&lt;P&gt;a) use options errorabend , but this disconnects the user from the server and log is also lost , for which i saved log at a particular location and was able to scan for error and error message but since user is disconnected &amp;nbsp;he/she will have to connect and run that code which is not feasible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) creating three macros:&lt;/P&gt;&lt;P&gt;1) if &amp;amp;syserr &amp;gt; 0 then %put : &amp;amp;syserrtxt&lt;/P&gt;&lt;P&gt;2) create a macro for mail-successful and unsucessful run as per syserr&lt;/P&gt;&lt;P&gt;3) abort program again as per &amp;amp;syserr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue with the above aproach is that my codes in individual programs are huge and will have to call this macro again and again in between the codes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;c) I am not sure if i can sue conditional processing , if yes then How?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-footer"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Mar 2017 17:20:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337464#M22429</guid>
      <dc:creator>rbatra</dc:creator>
      <dc:date>2017-03-02T17:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error Handling in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337514#M22433</link>
      <description>&lt;P&gt;The type of control you want over your SAS applications would be much better handled if you converted your EG project to run as a SAS batch job. ERRORABEND works with no problem in batch, logs are kept automatically and if you use the server-based schedulers available via SAS Management Console then emailing happens automatically too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your project is a business-critical process then you should seriously consider server-based scheduling and batch processing for your production jobs - in my view this would be best practice. PCs are just not reliable enough. Use EG for development and testing only.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:20:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337514#M22433</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-03-02T19:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error Handling in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337730#M22441</link>
      <description>&lt;P&gt;Concur with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;. Once you reach that level of process complexity, using a solid scheduler to run your programs in batch, and using the scheduler's capabilities to detect correct and incorrect batch runs, is a must.&lt;/P&gt;
&lt;P&gt;Check which scheduling software is used in your organisation, and have your SAS server integrated there.&lt;/P&gt;
&lt;P&gt;Everything else is just a form of slow and painful suicide.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 07:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Error-Handling-in-SAS-EG/m-p/337730#M22441</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-03T07:31:16Z</dc:date>
    </item>
  </channel>
</rss>

