<?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: Making EG Stop Executing subsequent process flows based on a value in the previous process flow in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313292#M21132</link>
    <description>&lt;P&gt;A new feature in EG 7.13, releasing *very* soon, could provide another way to achieve this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Prior to EG 7.13, when an error occurred in a running element in your process flow, execution would continue regardless of the error.&amp;nbsp; Now you can control the behavior with the following&amp;nbsp;project (or element) option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="actionOnError.png" alt="actionOnError.png" src="https://communities.sas.com/t5/image/serverpage/image-id/5937i733DCDE172852E11/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;So, following your example, you could set the "Action to take on errors during execution" to "Stop all items" and add a program at the end of "Process Flow A" that puts out an error if "Table1" is not empty.&amp;nbsp; Example code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; count(*) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;into&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; :recordCount &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; table1;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &lt;STRONG&gt;&lt;I&gt;putErrorIfNotEmpty&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;recordCount &amp;gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; ERROR: Not empty. Do not continue processing.;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;putErrorIfNotEmpty&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If Table1 is not empty, the program that checks at the end of "Process Flow A" will result in an error, which will stop all downstream execution (your other process flows will not run).&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2016 22:13:17 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2016-11-21T22:13:17Z</dc:date>
    <item>
      <title>Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/312993#M21119</link>
      <description>&lt;P&gt;I have a EG project&amp;nbsp;which has multiple process flows in SAS EG like "Process Flow A",&amp;nbsp;&lt;SPAN&gt;"Process Flow B",&amp;nbsp;"Process Flow C" and so on in that order. I have a final output table called "Table1" in "Process Flow A" from a query builder task. When I run the whole project, EG will execute the process flows in sequence starting from&amp;nbsp;"Process Flow A".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After EG has succesfully run the&amp;nbsp;"Process Flow A" and generated the final output which is "Table1", I want EG to proceed running the subsequent process flows ("Process Flow B",&amp;nbsp;&lt;SPAN&gt;"Process Flow C" and so on)&lt;/SPAN&gt; only if the "Table1" is empty, if not I want it to stop running. I don't want it to end the EG session and lose all the data (WORK), I just want it to stop executing further. I am using SAS EG 7.1. How do I achieve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 09:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/312993#M21119</guid>
      <dc:creator>Arun_SP</dc:creator>
      <dc:date>2016-11-21T09:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/312995#M21120</link>
      <description>&lt;P&gt;To be honest, I have seen this question a few times on here, and it really doesn't make sense to me. &amp;nbsp;If you have planned a process thoroughly, then the end of that should be a report which either contiains output, or is just a report stating that nothing wass returned at X point. &amp;nbsp;Just stopping a process at a certain point tells the end user nothing.&lt;/P&gt;
&lt;P&gt;It can be done, just query sashelp.vtable (where=(libname="your libname" and memname="the dataset in question)); and if nobs=0 then exit, or dont' call the next program.&lt;/P&gt;
&lt;P&gt;However, I still say that its better to run through the process - put a conditional round any blocks which use this data which might be empty, and then output a report at the end stating process run and complete and here are your outputs one of which is empty as nothing returned from program XYZ.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 09:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/312995#M21120</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-21T09:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313292#M21132</link>
      <description>&lt;P&gt;A new feature in EG 7.13, releasing *very* soon, could provide another way to achieve this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Prior to EG 7.13, when an error occurred in a running element in your process flow, execution would continue regardless of the error.&amp;nbsp; Now you can control the behavior with the following&amp;nbsp;project (or element) option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="actionOnError.png" alt="actionOnError.png" src="https://communities.sas.com/t5/image/serverpage/image-id/5937i733DCDE172852E11/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;So, following your example, you could set the "Action to take on errors during execution" to "Stop all items" and add a program at the end of "Process Flow A" that puts out an error if "Table1" is not empty.&amp;nbsp; Example code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; count(*) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;into&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; :recordCount &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; table1;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &lt;STRONG&gt;&lt;I&gt;putErrorIfNotEmpty&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;recordCount &amp;gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; ERROR: Not empty. Do not continue processing.;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;putErrorIfNotEmpty&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If Table1 is not empty, the program that checks at the end of "Process Flow A" will result in an error, which will stop all downstream execution (your other process flows will not run).&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 22:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313292#M21132</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2016-11-21T22:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313320#M21134</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9﻿&lt;/a&gt;&amp;nbsp;Thank you for your response. I have very very little experience&amp;nbsp;with SAS programming, so I am not sure how to acheive this and I am stuck. Here's what I did so far.&amp;nbsp;I added Program at the end of the Process Flow A (Linked it to the final table: Table1) with the following macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro stop_execute;
proc sql;
select nobs into :Count_Rows from SASHELP.VTABLE WHERE LibName = 'WORK' AND MemName = 'Table1' ;
quit;
%if &amp;amp;Count_Rows &amp;gt; 0 %then "How do I ask EG to stop executing further?";
%else "How do I ask EG to continue executing further?";
%mend;
%stop_execute;&lt;/PRE&gt;&lt;P&gt;I am not able to figure out what should be written in the "How do I ask EG to stop executing further?" and&amp;nbsp;&lt;SPAN&gt;"How do I ask EG to continue&amp;nbsp;executing further?" parts. Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 02:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313320#M21134</guid>
      <dc:creator>Arun_SP</dc:creator>
      <dc:date>2016-11-22T02:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313394#M21136</link>
      <description>&lt;P&gt;The way I would do it is to: if no obs then create template balnk table and continue:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set sashelp.vtable (where=(libname="your lib" and memname="your dataset"));
  if nobs= 0 then call execute('data want; result="No observations were found"; run;');
run;&lt;/PRE&gt;
&lt;P&gt;So if there are no observations in your dataset, then a template dataset with just the one observation is created, which can then go further into your process and be reported as such. &amp;nbsp;No need for conditional execution.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 09:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313394#M21136</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-22T09:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313404#M21138</link>
      <description>&lt;P&gt;You can end a data step from iterating further using statement STOP, but you can't really tell SAS to no more execute downstream run groups based on some condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could issue issue statements like ENDSAS or ABORT but this wouldn't only stop your current programs from running, it would end your SAS session (=disconnect your EG session from the server) and you loose all your data in Work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only "hack" I can currently think of would be to wrap a macro around your flows and implement conditional processing logic this way.&lt;/P&gt;
&lt;P&gt;Per flow have a program node at the very beginning and at the very end of the flow.&lt;/P&gt;
&lt;P&gt;Code at the beginning of the flow.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro wrapper(libname=, memname=);
  %local nobs;
  %let nobs=0;
  proc sql;
    select nobs into :nobs
    from dictionary.tables
    where libname=%upcase("&amp;amp;libname") and memname=%upcase("&amp;amp;memname")
    ;
  quit;

  %put &amp;amp;=nobs;

  %if %eval(&amp;amp;nobs&amp;gt;0) %then %do;
  /********************************/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Code at the end of the flow:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  /*******************************/
  %end;
%mend;
%wrapper(libname=WORK, memname=TABLE1)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Nov 2016 10:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/313404#M21138</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-11-22T10:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/315759#M21289</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick﻿&lt;/a&gt;&amp;nbsp;Thank you for your response, I tried what you said, so Process Flow A has a table at then end named Work.Table1 as mentioned earlier. In Process Flow B, I added what you said,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6143iDE52172F968D19DB/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="SAS Error.PNG" title="SAS Error.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the project (which contains both Process Flow A &amp;amp; B). I get error "49" followed by the note&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this error seemed to spread to all the components in the project. I tried removing the commented out sections of the macro (/***....**/ after the %if statement and the same before %end) as suggested by andrewm&lt;SPAN class=""&gt;&amp;nbsp;in this post&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/quot-NOTE-49-169-The-meaning-of-an-identifier-after-a-quoted/td-p/121796/page/2" target="_blank"&gt;"NOTE 49-169: The meaning of an identifier after a quoted string....." error&lt;/A&gt;. But it doesn't solve the issue!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 02:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/315759#M21289</guid>
      <dc:creator>Arun_SP</dc:creator>
      <dc:date>2016-12-01T02:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/316581#M21315</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/116102"&gt;@Arun_SP﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I can replicate what you describe. The code as such would be totally fine and if you export the code in the flow and then run everything in a single program node, things work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears that EG adds at the beginning and the end of every single node some additional code before execution and this seems to mess up this wrapper macro approach. I've done some testing and this already happens when you have nothing else than a wrapping "%macro /%mend" bracket without any further code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I couldn't find a work-around so sorry for posting a solution which doesn't work for your use case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One could ask the question if this is an EG bug as it's EG messing up totally valid code.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2016 21:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/316581#M21315</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-12-04T21:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Making EG Stop Executing subsequent process flows based on a value in the previous process flow</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/416185#M26767</link>
      <description>&lt;P&gt;Arun_SP,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked exactly as you wanted in SAS EG 5.1&amp;nbsp; in terms of stopping program execution (the count conditions are specific to my requirement):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	data _null_ ;
	if &amp;amp;cnt &amp;gt; 0 then DO ;
	PUT 'ERROR:There are CustomerGroup Numbers in the Plan B listing that are not themselves listed as CustomerNos also. Add these to the dataset cust_mapping_by_rank.' ;
	ABORT CANCEL;
	END;
	if &amp;amp;cnt = 0 then DO ;
	file print;
	PUT 'All CustomerGroup Numbers in the Plan B listing are now listed themselves listed as CustomerNos also.';
	end;
	file log;
	run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ABORT CANCEL is the correct statment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The WORK library contents are retained and the SAS server is not disconnected. At the same time, no further programs from the SAS EG project are executed.&amp;nbsp;Subsequent DATA / PROC segments within the&amp;nbsp;same program are also NOT executed. An ERROR is written to the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At least, this has been my experience.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 12:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Making-EG-Stop-Executing-subsequent-process-flows-based-on-a/m-p/416185#M26767</guid>
      <dc:creator>constliv</dc:creator>
      <dc:date>2017-11-26T12:12:17Z</dc:date>
    </item>
  </channel>
</rss>

