<?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 stop SAS not to Execute any Furthur statements outside Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379603#M276907</link>
    <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Add this to your %THEN %DO loop to see if it provides the desired result:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;  abort cancel; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2017 22:58:09 GMT</pubDate>
    <dc:creator>Vince_SAS</dc:creator>
    <dc:date>2017-07-26T22:58:09Z</dc:date>
    <item>
      <title>How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379306#M276897</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a master program which executes multiple sas programs based on different conditions between each other. So here based on&amp;nbsp;a particular confition,&amp;nbsp;I want sas &lt;STRONG&gt;not to process any furthur datasets/statements&lt;/STRONG&gt; (SAS CODE OUTSIDE MACRO ALSO)&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please check sample code below and code below should not execute code for dataset Class2.&amp;nbsp; Please suggest me how to achieve this. (I tried with&amp;nbsp;"Return" statement&amp;nbsp;but it still executes 'class2' and if we use GOTO statemnt, we should write lable with in Macro only). Your help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; class;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sashelp.class; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sex=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'n'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;chk&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*) into :cnt from class;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;cnt.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Le &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; 'data is not Available';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; 'SAS will exit and not process any furthur datasets';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; 'Data is Available';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;chk&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; class2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sashelp.class;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Hari.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 09:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379306#M276897</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-26T09:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379311#M276898</link>
      <description>&lt;P&gt;You can do it in a number of ways. &amp;nbsp;Are you using EnterriseGuide for intance as that has conditionals on program execution. &amp;nbsp;You can do it in code in a number of ways also:&lt;/P&gt;
&lt;PRE&gt;data class;
  set sashelp.class;
  where sex='n';
run;

data _null_;
  set sashelp.vtable (where=(libname="WORK" and memname="CLASS"));
  if nobs=0 then call execute('%put "No obs found, nothing further done";');
  else call execute('%put "Obs found, doing something";');
run;&lt;/PRE&gt;
&lt;P&gt;Using code generation. &amp;nbsp;You could also call macros or other code in those blocks, or include other programs&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 09:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379311#M276898</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-26T09:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379323#M276899</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I don't use EG rather I use PC SAS and will submit in remote session.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please use code which I have posted, run and make it not to execute the code which is written for Classe 2 datset creation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should stop SAS not to process any thing furthur at all when Number o frecords in class is &amp;lt;= 0 (As per code which I posted earlier).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 10:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379323#M276899</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-26T10:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379344#M276900</link>
      <description>&lt;P&gt;Try %ABORT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;

set sashelp.class;

where sex='n';

run;

 

%macro chk;

proc sql;

select count(*) into :cnt from class;

quit;

%if &amp;amp;cnt. Le 0 %then %do;

%put 'data is not Available';

%put 'SAS will exit and not process any furthur datasets';

%end;

%else %put 'Data is Available';

　%abort;

%mend;

%chk

data class2;

set sashelp.class;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2017 11:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379344#M276900</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-07-26T11:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379351#M276901</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even %Abort will work same as %return. In our case,&amp;nbsp;the given code&amp;nbsp;still creates Class2 dataset. pleaes gove any other alternative.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 12:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379351#M276901</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-26T12:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379355#M276902</link>
      <description>&lt;P&gt;If you want to run last step when there are more than 0 observations then&lt;/P&gt;
&lt;P&gt;enter your conditional code to run inside the macro:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro chk;
   proc sql;
      select count(*) into :cnt from class;
   quit;
  %if &amp;amp;cnt. Le 0 %then %do;
       %put 'data is not Available';
       %put 'SAS will exit and not process any furthur datasets';
  %end;
  %else %do;
      %put 'Data is Available';
      data class2;
       set sashelp.class;
      run;
  %end;　
%mend;
%chk;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2017 12:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379355#M276902</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-07-26T12:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379360#M276903</link>
      <description>&lt;P&gt;Thanks you Sir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this is not what I am expecting. In my actual code, I will have many other data steps &lt;STRONG&gt;outside of Macro &lt;/STRONG&gt;and I should not execute any of them when&amp;nbsp; a certain conditon with in that macro is satisfied. please check again and revert.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 12:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379360#M276903</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-26T12:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379363#M276904</link>
      <description>&lt;P&gt;Then save the conditional code to run as a separate file and do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro chk;
   proc sql;
      select count(*) into :cnt from class;
   quit;
  %if &amp;amp;cnt. Le 0 %then %do;
       %put 'data is not Available';
       %put 'SAS will exit and not process any furthur datasets';
  %end;
  %else %do;
      %put 'Data is Available';
      
       %include '...path_and_name_of_code_to_run.sas';

  %end;　
%mend;
%chk;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2017 12:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379363#M276904</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-07-26T12:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379364#M276905</link>
      <description>&lt;P&gt;Use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ENDSAS;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;instead of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%abort;&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 12:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379364#M276905</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-07-26T12:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379403#M276906</link>
      <description>&lt;P&gt;Hari,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest you look at the following article to see if it can play into your scenario (vs just the mockup code below):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-stmt-waitfor.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-stmt-waitfor.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the direction I would look at facing similar issues in the past. YMMV.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 14:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379403#M276906</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-07-26T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379603#M276907</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Add this to your %THEN %DO loop to see if it provides the desired result:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;  abort cancel; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 22:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/379603#M276907</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2017-07-26T22:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384260#M276908</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for late reply.&lt;/P&gt;&lt;P&gt;"endsas" works in local pc sas. however , I want to end it remote session and unfortunately its not working when I submit between RSUBMIT and ENDRSUBMIT.&amp;nbsp; I want this to work between rsubmit and endrsubmit, becaue our process runs remotely and any condition that I chekc will be in remote only. so based on&amp;nbsp;condition, SAS sessin should end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384260#M276908</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-31T13:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384268#M276909</link>
      <description>&lt;P&gt;Hvae you tried to use the macro program I have posted ?&lt;/P&gt;
&lt;P&gt;The logic of it is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;rsubmit;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;%macro macro_name;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;%if &amp;lt;condition&amp;gt; is true&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%then %do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;run code-1&amp;gt; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;%else do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;run code-2&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;%end;&lt;/P&gt;
&lt;P&gt;%mend macro_name;&lt;/P&gt;
&lt;P&gt;%macro_name;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;endrsubmit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where &amp;lt;run_code&amp;gt; is any sas code or program included.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384268#M276909</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-07-31T13:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384282#M276910</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this too. It's a direct code or through #include, the challenge&amp;nbsp;is sas was executing rest of the code after macro. I dont want that to happen because once I find any error in any step sas should not execute any statements furthur.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now finally some how I am able to do it using endsas itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggetions.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384282#M276910</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-31T14:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop SAS not to Execute any Furthur statements outside Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384294#M276911</link>
      <description>&lt;P&gt;Hi, This works but the challenge is sas will still&amp;nbsp;execute statements outside macro/step which are written after. This should not happen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;endsas option is working for me. thanks for your suggetion.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-SAS-not-to-Execute-any-Furthur-statements-outside/m-p/384294#M276911</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2017-07-31T14:53:37Z</dc:date>
    </item>
  </channel>
</rss>

