<?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: Use Prompts to conditionally execute Process Flows in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16135#M3036</link>
    <description>Have you seen Conditions in EG 4.2 and 4.3?  &lt;BR /&gt;
&lt;BR /&gt;
You can attach a Condition to any node that can be run (task, query, program) and if the condition is met, the node (and all downstream nodes in the flow) will run.  If not, the flow stops right there.&lt;BR /&gt;
&lt;BR /&gt;
You can use a prompt value as a condition (as well as date/time, data value, and in 4.3 we added macro variable value).&lt;BR /&gt;
&lt;BR /&gt;
Right-click on the first node in your flow and select Condition-&amp;gt;Add to see how it works.  If you want to pre-empt the entire flow, add a dummy SAS program node (doesn't need anything it) at the start of the flow, and link all subsequent nodes to it (right-click-&amp;gt;Link to...).  Then add the Condition to that first node.  If the condition fails, the entire flow is skipped.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
    <pubDate>Tue, 01 Mar 2011 19:44:23 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2011-03-01T19:44:23Z</dc:date>
    <item>
      <title>Use Prompts to conditionally execute Process Flows</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16133#M3034</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
How can I use a prompt to run a Process Flow? For instance, if the result of a prompt is value ABC, then run Process Flow 1, if the result is value QPR then run Process Flow 2. &lt;BR /&gt;
&lt;BR /&gt;
Henri</description>
      <pubDate>Wed, 23 Feb 2011 21:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16133#M3034</guid>
      <dc:creator>HenriTheuwissen</dc:creator>
      <dc:date>2011-02-23T21:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use Prompts to conditionally execute Process Flows</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16134#M3035</link>
      <description>One way is to use the macro values in %if %then %do blocks or to use %include statements or to use dynamic code built depending on the macro values.  This is the basics for dynamic SAS programming!!!  It's very flexible and a feature that makes SAS stand out as a premier 4 GL tool.</description>
      <pubDate>Thu, 24 Feb 2011 18:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16134#M3035</guid>
      <dc:creator>SAS_Doctor</dc:creator>
      <dc:date>2011-02-24T18:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use Prompts to conditionally execute Process Flows</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16135#M3036</link>
      <description>Have you seen Conditions in EG 4.2 and 4.3?  &lt;BR /&gt;
&lt;BR /&gt;
You can attach a Condition to any node that can be run (task, query, program) and if the condition is met, the node (and all downstream nodes in the flow) will run.  If not, the flow stops right there.&lt;BR /&gt;
&lt;BR /&gt;
You can use a prompt value as a condition (as well as date/time, data value, and in 4.3 we added macro variable value).&lt;BR /&gt;
&lt;BR /&gt;
Right-click on the first node in your flow and select Condition-&amp;gt;Add to see how it works.  If you want to pre-empt the entire flow, add a dummy SAS program node (doesn't need anything it) at the start of the flow, and link all subsequent nodes to it (right-click-&amp;gt;Link to...).  Then add the Condition to that first node.  If the condition fails, the entire flow is skipped.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Tue, 01 Mar 2011 19:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16135#M3036</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2011-03-01T19:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use Prompts to conditionally execute Process Flows</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16136#M3037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris, I have a question... to use the condition is very helpful, but when I run the whole flow, all prompts must be filled, even though the condition is based on a previous prompt and it fails. What can I do if I want the prompts to appear conditionally, based on the values on the previous prompts? I don't want all the prompts to appear when I run the flow/project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 19:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/16136#M3037</guid>
      <dc:creator>JohanaOsorio</dc:creator>
      <dc:date>2012-07-03T19:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use Prompts to conditionally execute Process Flows</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/483722#M31360</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is a super old thread but I wanted to ask about using SAS prompts for conditional processing and it was the most relevant one that I could find, plus you also seem to know about this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an EG project which is a collection of all the week end processing code that we run. I wanted to add some additional code that is only required at month end. I already define a macro variable "month_end" as 1 for the weeks we class as month end and 0 otherwise. I am then using this to conditionally process the month end code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow.JPG" style="width: 155px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22194i6A7E22410306134F/image-dimensions/155x81?v=v2" width="155" height="81" role="button" title="Flow.JPG" alt="Flow.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is around the format of the condition that I am creating as I can't quite understand how this works. I created this on my own PC but the project is run by a number of other users as well. When I initially created the condition, I filled in the box like this (or without the &amp;amp; and . on the macro variable name, I think I tried both):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Condition 1.JPG" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22193i5C4EC64B8BD2C97A/image-dimensions/385x277?v=v2" width="385" height="277" role="button" title="Condition 1.JPG" alt="Condition 1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, that didn't seem to work on my PC and, after a bit of research I added quotes around both the macro variable and the value and it seemed to work. However, when my boss then ran the project it didn't work for him, the condition failed every time and nothing ran. I then changed back to the above on his PC and for some reason that worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no idea what is going on with this. Firstly, do you know which format is correct? Secondly, is there any reason this would differ between two PCs, both, I believe, on SAS EG 7.1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, as I have more than one bit of month end code, I read that the flow stops when a condition is failed and downstream code does not run. I have not found this to be the case and have had to add the same condition to all relevant bits of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help on this would be very much appreciated.&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;&lt;P&gt;Steph&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 10:38:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/483722#M31360</guid>
      <dc:creator>SD_SAS_User</dc:creator>
      <dc:date>2018-08-03T10:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Use Prompts to conditionally execute Process Flows</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/720130#M38203</link>
      <description>&lt;P&gt;Dear Johana,&lt;/P&gt;&lt;P&gt;in march 2012 you posted a question to Chris about conditional appearing of prompts in SAS: "What can I do if I want the prompts to appear conditionally, based on the values on the previous prompts? I don't want all the prompts to appear when I run the flow/project."&lt;/P&gt;&lt;P&gt;Do you have already an answer or a solution of the problem. I have really exact the sam problem.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 08:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Use-Prompts-to-conditionally-execute-Process-Flows/m-p/720130#M38203</guid>
      <dc:creator>Jirko</dc:creator>
      <dc:date>2021-02-18T08:44:40Z</dc:date>
    </item>
  </channel>
</rss>

