<?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 Suppressing Errors on PROC SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519091#M140549</link>
    <description>&lt;P&gt;We have production jobs that use SAS and is designed to fail whenever SAS returns an error.&amp;nbsp; Many of these production jobs read large amounts of data from external databases (Oracle, SQL server, etc.) via multiple queries, which will sometimes fail due to server issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there's a way to artificially catch these server errors and prevent SAS from throwing out an error itself; I wanted to make something similar to the .try/.catch system in other languages, where each DB query error would increment an internal counter and cause that query to restart; the job would abort after the internal counter reaches a certain threshold.&amp;nbsp; This is to prevent the jobs from breaking after a single timeout error on a single query after 2 hours of running other queries, requiring a restart of a long job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2018 12:04:58 GMT</pubDate>
    <dc:creator>Loadbasic</dc:creator>
    <dc:date>2018-12-06T12:04:58Z</dc:date>
    <item>
      <title>Suppressing Errors on PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519091#M140549</link>
      <description>&lt;P&gt;We have production jobs that use SAS and is designed to fail whenever SAS returns an error.&amp;nbsp; Many of these production jobs read large amounts of data from external databases (Oracle, SQL server, etc.) via multiple queries, which will sometimes fail due to server issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there's a way to artificially catch these server errors and prevent SAS from throwing out an error itself; I wanted to make something similar to the .try/.catch system in other languages, where each DB query error would increment an internal counter and cause that query to restart; the job would abort after the internal counter reaches a certain threshold.&amp;nbsp; This is to prevent the jobs from breaking after a single timeout error on a single query after 2 hours of running other queries, requiring a restart of a long job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 12:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519091#M140549</guid>
      <dc:creator>Loadbasic</dc:creator>
      <dc:date>2018-12-06T12:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing Errors on PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519095#M140552</link>
      <description>&lt;P&gt;There's two solutions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the preferred one: spread your work over several successive jobs and let the scheduler keep track of success. No work is lost from the jobs 1 to n-1 if job n fails.&lt;/LI&gt;
&lt;LI&gt;check within SAS for the &amp;amp;syscc automatic macro variable. It will be at zero as long as everything is OK.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The second method carries the risk that your SAS job is repeating a particular task even if that task CANNOT succeed at all, and thus wastes valuable time that could have been spent searching for and fixing the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 12:17:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519095#M140552</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-06T12:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Suppressing Errors on PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519217#M140592</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/250265"&gt;@Loadbasic&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;We have production jobs that use SAS and is designed to fail whenever SAS returns an error.&amp;nbsp; Many of these production jobs read large amounts of data from external databases (Oracle, SQL server, etc.) via multiple queries, which will sometimes fail due to server issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Has your management team been apprised of how often these data sources fail? I would be very concerned if my databases are not accessible when actually needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 17:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppressing-Errors-on-PROC-SQL/m-p/519217#M140592</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-06T17:07:58Z</dc:date>
    </item>
  </channel>
</rss>

