<?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: ERROR HANDLING in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71420#M20630</link>
    <description>abort abend???</description>
    <pubDate>Tue, 15 Sep 2009 13:54:42 GMT</pubDate>
    <dc:creator>FredrikE</dc:creator>
    <dc:date>2009-09-15T13:54:42Z</dc:date>
    <item>
      <title>ERROR HANDLING</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71417#M20627</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to make a SAS JOB fail. I need a way to make a job fail if the last table has no columns. How can I do this? I made a user transform with one input and no output, I can count the rows, but can't find a way to make an error of it.That is I can make an error but it happens even when there are multiple rows in the table. I used ABORT way to stop it, but this does not generate an error. But the user tranform wont let me use my macro for sending mail in this case. So then I need an error as this generates an error mail.&lt;BR /&gt;
&lt;BR /&gt;
Hope someone knows.&lt;BR /&gt;
&lt;BR /&gt;
-Daniel</description>
      <pubDate>Tue, 15 Sep 2009 11:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71417#M20627</guid>
      <dc:creator>RicoQQ</dc:creator>
      <dc:date>2009-09-15T11:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR HANDLING</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71418#M20628</link>
      <description>SAS version?  OS where SAS JOB is running?  This information makes a difference and is important with each SAS forum post.&lt;BR /&gt;
&lt;BR /&gt;
And please...share your code that is not working for you to get useful feedback.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 15 Sep 2009 12:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71418#M20628</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-09-15T12:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR HANDLING</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71419#M20629</link>
      <description>This is for DI Studio 3.4 (metaserver 9.1.3.4)&lt;BR /&gt;
&lt;BR /&gt;
I do not have much code as I do not get it to work, but here is what I start with;&lt;BR /&gt;
&lt;BR /&gt;
%LET dsid=%SYSFUNC(OPEN(&amp;amp;syslast.));&lt;BR /&gt;
%LET n=%SYSFUNC(ATTRN(&amp;amp;dsid,NOBS));&lt;BR /&gt;
%LET rc=%SYSFUNC(CLOSE(&amp;amp;dsid));&lt;BR /&gt;
&lt;BR /&gt;
This gives me number of records in last table, so if &amp;amp;n. &amp;lt; 1 then I want the job to go to error. This is all suposed to happend in a user transform. &lt;BR /&gt;
&lt;BR /&gt;
Any idea?&lt;BR /&gt;
&lt;BR /&gt;
-Daniel</description>
      <pubDate>Tue, 15 Sep 2009 13:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71419#M20629</guid>
      <dc:creator>RicoQQ</dc:creator>
      <dc:date>2009-09-15T13:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR HANDLING</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71420#M20630</link>
      <description>abort abend???</description>
      <pubDate>Tue, 15 Sep 2009 13:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71420#M20630</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2009-09-15T13:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR HANDLING</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71421#M20631</link>
      <description>To start, you are working with the SAS macro language.  So you will need to consider coding a SAS macro with %IF %THEN %DO %END  (possibly) and use the %ABORT statement.  Or as was mentioned, conditionally execute a SAS DATA step to generate a more meaningful output message to the SAS log and then execute an ABORT ABEND  statement.&lt;BR /&gt;
&lt;BR /&gt;
Also, in addition to the recommended DOC reading below, you may find additional info in the SAS companion guide for your Operating System, where ABORT is further discussed for your OS.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Macro Language - %ABORT Statement&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002475061.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002475061.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Dictionary - ABORT statement&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000230210.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000230210.htm&lt;/A&gt;</description>
      <pubDate>Tue, 15 Sep 2009 14:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-HANDLING/m-p/71421#M20631</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-09-15T14:23:58Z</dc:date>
    </item>
  </channel>
</rss>

