<?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: How to terminate a DS2 program with error? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/456142#M284258</link>
    <description>I, ll read more about the logger package and I 'll post here if I find out something.</description>
    <pubDate>Sat, 21 Apr 2018 05:17:45 GMT</pubDate>
    <dc:creator>b1958</dc:creator>
    <dc:date>2018-04-21T05:17:45Z</dc:date>
    <item>
      <title>How to terminate a DS2 program with error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455069#M284254</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to terminate a DS2 program with error? If so how?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that the Abort statement is not available in DS2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 09:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455069#M284254</guid>
      <dc:creator>b1958</dc:creator>
      <dc:date>2018-04-18T09:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to terminate a DS2 program with error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455438#M284255</link>
      <description>&lt;P&gt;I guess an ugly kludge could be to add something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; if COND then do; DIV=0 ;DIV=1/DIV; end;  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This results in a general error and stops&amp;nbsp;further processing.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 01:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455438#M284255</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-04-19T01:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to terminate a DS2 program with error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455484#M284256</link>
      <description>&lt;P&gt;To put an error in the log, use the log metod, e.g.:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ds2 ;
data _NULL_;
   dcl package logger root();
   method init();
      root.log(n'error', 'you got yhis all wrong!');
   end;
enddata;
run;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To stop execution, use STOP or whatever.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 07:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455484#M284256</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-04-19T07:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to terminate a DS2 program with error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455609#M284257</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I ran your&amp;nbsp;exact code from EG. Is it possible to get the Message out in&amp;nbsp; the regular job log?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         proc ds2 ;
27         data _NULL_;
28            dcl package logger root();
29            method init();
30               root.log(n'error', 'you got yhis all wrong!');
31            end;
32         enddata;
33         run;
NOTE: Execution succeeded. No rows affected.
34         quit;

NOTE: PROCEDURE DS2 used (Total process time):
      real time           1.73 seconds
      cpu time            0.09 seconds
      &lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/455609#M284257</guid>
      <dc:creator>b1958</dc:creator>
      <dc:date>2018-04-19T13:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to terminate a DS2 program with error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/456142#M284258</link>
      <description>I, ll read more about the logger package and I 'll post here if I find out something.</description>
      <pubDate>Sat, 21 Apr 2018 05:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-terminate-a-DS2-program-with-error/m-p/456142#M284258</guid>
      <dc:creator>b1958</dc:creator>
      <dc:date>2018-04-21T05:17:45Z</dc:date>
    </item>
  </channel>
</rss>

