<?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: SAS EG : stop the program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720441#M223182</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried looking into the &lt;FONT face="courier new,courier"&gt;abort&lt;/FONT&gt; statement? The documentation can be found&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lestmtsref&amp;amp;docsetTarget=p0hp2evpgqvfsfn1u223hh9ubv3g.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2021 12:24:36 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2021-02-19T12:24:36Z</dc:date>
    <item>
      <title>SAS EG : stop the program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720422#M223179</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm coding in SAS EG, I would like to stop the execution of my program if I have 0 rows in my data. Do you know some option to do that please ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean thant in my EG projet I have 3 programs : firstly I run the pgm_1, after the pgm_2 and the pgm_3.&lt;/P&gt;
&lt;P&gt;I would like to put the code in pgm_1, and stop the pgm_2 and pgm_3 if _n_=0 (I run the program by order list). I don't know if it's possible in EG.&lt;/P&gt;
&lt;P&gt;My code is:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
	select count(*) into :nb from PRRT;
quit; 

%if &amp;amp;nb=0 %then
	%do;
        STOP ?
	%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you very much !&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 11:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720422#M223179</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-02-19T11:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG : stop the program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720441#M223182</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried looking into the &lt;FONT face="courier new,courier"&gt;abort&lt;/FONT&gt; statement? The documentation can be found&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lestmtsref&amp;amp;docsetTarget=p0hp2evpgqvfsfn1u223hh9ubv3g.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 12:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720441#M223182</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2021-02-19T12:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG : stop the program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720442#M223183</link>
      <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185" target="_blank"&gt;MarieT&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do it this way, for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if &amp;amp;nb=0 %then
%do;
   data _null_;
      abort return;
   run;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lestmtsref&amp;amp;docsetTarget=p0hp2evpgqvfsfn1u223hh9ubv3g.htm&amp;amp;locale=en" target="_self"&gt;ABORT Statement&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 12:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-stop-the-program/m-p/720442#M223183</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-02-19T12:24:40Z</dc:date>
    </item>
  </channel>
</rss>

