<?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 can i terminate a sas job with sas code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74807#M16117</link>
    <description>Hi:&lt;BR /&gt;
  In addition to Patrick's suggestions, I suggest you investigate the difference between a DATA step IF statement and a macro program %IF statement. Sometimes when you want to conditionally execute code, and if you are using macro programs, it is easier to test conditions and conditionally send code to the compiler using %IF.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Sun, 26 Sep 2010 15:19:25 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-09-26T15:19:25Z</dc:date>
    <item>
      <title>how can i terminate a sas job with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74805#M16115</link>
      <description>Hi, All!&lt;BR /&gt;
&lt;BR /&gt;
     I edit job, there are many steps,  in the middle of the job, if some condition arrive, I will terminate the job, do not excute the following steps, such as:&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set &lt;BR /&gt;
format ....&lt;BR /&gt;
run;&lt;BR /&gt;
%macro ....&lt;BR /&gt;
%mend....&lt;BR /&gt;
&lt;BR /&gt;
%macro-name;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
if(condition succeed);&lt;BR /&gt;
exit(10);                               /* exit the job, do not execute following code   */&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%exit(11);                /*  otherwise exit the job, do not execute following code.   */&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
something deal.........;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
      <pubDate>Sun, 26 Sep 2010 02:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74805#M16115</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-26T02:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: how can i terminate a sas job with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74806#M16116</link>
      <description>Look up:&lt;BR /&gt;
- abort&lt;BR /&gt;
- %abort&lt;BR /&gt;
- endsas&lt;BR /&gt;
- stop</description>
      <pubDate>Sun, 26 Sep 2010 10:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74806#M16116</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-09-26T10:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: how can i terminate a sas job with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74807#M16117</link>
      <description>Hi:&lt;BR /&gt;
  In addition to Patrick's suggestions, I suggest you investigate the difference between a DATA step IF statement and a macro program %IF statement. Sometimes when you want to conditionally execute code, and if you are using macro programs, it is easier to test conditions and conditionally send code to the compiler using %IF.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sun, 26 Sep 2010 15:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-terminate-a-sas-job-with-sas-code/m-p/74807#M16117</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-26T15:19:25Z</dc:date>
    </item>
  </channel>
</rss>

