<?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: Forcing a SAS error state in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28181#M6547</link>
    <description>another route : use call execute() to conditionally generate a syntax error condition. Perhaps this might work/fail adequately [pre]DATA _NULL_ ;&lt;BR /&gt;
   if  ( conditions like &amp;amp;_sysrc that determine task failure) then&lt;BR /&gt;
        CALL EXECUTE( 'data 123; run;' ) ;  &lt;BR /&gt;
run ;[/pre]&lt;BR /&gt;
PeterC</description>
    <pubDate>Tue, 01 Jul 2008 13:03:45 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-07-01T13:03:45Z</dc:date>
    <item>
      <title>Forcing a SAS error state</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28179#M6545</link>
      <description>I'm trying to figure out how to trigger a SAS code "error" when I run a X command that has an error return code.&lt;BR /&gt;
&lt;BR /&gt;
I am running a Unix script in my sas code.  If the Unix script fails, there is no warning, and Enterprise Guide keeps processing the sas code. I am able to capture the return code of the script by referencing the macro variable &amp;amp;sysrc.  I'm not sure how to force Enterprise Guide to trigger an error state based on the &amp;amp;sysrc code from the Unix script.  I would like Enterprise Guide to throw an error similar to the type of error when a data step bombs.&lt;BR /&gt;
&lt;BR /&gt;
I am thinking that there may be a way to re-assign the SASERR macro variable to my own value, but I'm not sure how to do it.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Fri, 27 Jun 2008 18:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28179#M6545</guid>
      <dc:creator>snkfischer</dc:creator>
      <dc:date>2008-06-27T18:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a SAS error state</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28180#M6546</link>
      <description>"there may be a way to re-assign the SASERR macro variable to my own value".  I don't use EG much, but in code I would write %let _sysrc=&amp;amp;sysrc; to capture the error return code and then use &amp;amp;_sysrc to check the error condition.  You can do the same thing with &amp;amp;syserr.  Good luck.</description>
      <pubDate>Mon, 30 Jun 2008 20:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28180#M6546</guid>
      <dc:creator>bentleyj</dc:creator>
      <dc:date>2008-06-30T20:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a SAS error state</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28181#M6547</link>
      <description>another route : use call execute() to conditionally generate a syntax error condition. Perhaps this might work/fail adequately [pre]DATA _NULL_ ;&lt;BR /&gt;
   if  ( conditions like &amp;amp;_sysrc that determine task failure) then&lt;BR /&gt;
        CALL EXECUTE( 'data 123; run;' ) ;  &lt;BR /&gt;
run ;[/pre]&lt;BR /&gt;
PeterC</description>
      <pubDate>Tue, 01 Jul 2008 13:03:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Forcing-a-SAS-error-state/m-p/28181#M6547</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-01T13:03:45Z</dc:date>
    </item>
  </channel>
</rss>

