BookmarkSubscribeRSS Feed
0 Likes

Add "Do Not Run" to the "Based on" list in the dialog "Add (Edit) a Condition".  Let this add a "Do Not Run" to the list under "If this condition is true:".  If this is the only condition then the program node does not run.  Let this be equivalent to a condition based on a macro variable "If this condition is true: 1 equal to 0" or:

%if 0 %then %do;

The "Conditional Processing" dialog is accessed when adding a condition to a node in a EG program node or other object.  When using the Add (or Edit) button a dialog titled "Add (Edit) a Condition" appears.  This dialog has a list named "Based on".

 

I rarely use Conditional Processing... but when I do, I use it to exclude a node, or branch, from being run.  This change helps communicate intent "not to run" a particular object rather than using another means that is intended to communicate that there is a variable condition that might change dependent on some change of a value.  Currently I use this hack, to do this: I add a condition to the node, make it based on a macro variable and fill out the as show below.  It appears in the "Conditional Processing" as "1 equal to 0":  

macro variable: 1

operator: equals

value: 0

 

See the attachment  Do_Not_Run_Program(3).egp.zip (28 KB) which is a an EGP file (change the extension back to EGP).  

 

Its noted that this isn't how Conditional Processing was meant to be, but I find use in it.  I hope you consider it.

5 Comments
fifthand57th
SAS Employee
Status changed to: Under Consideration

Hi @PhilC,

 

I added a link to this request in the existing SAS Enterprise Guide suggestion. R&D is considering it for a future EG release. 

 

This is not exactly what you are asking for but I want to point it out just in case you are unaware. Beginning in EG 7.13, there is an "Action to take on errors during execution" option located in Project Properties under the File menu. You can set this option globally for an entire project under Project Properties or you can also override this setting for an individual task, program, or query by updating the properties for that item.

 

Action to take on errors during execution

Specifies how to handle an error during the execution of items in a project or process flow.

  • Stop all items stops the execution of all subsequent items in the project or process flow.
  • Stop current branch stops the execution of all subsequent items in the current branch of the process flow. This is the default value.
  • Continue execution continues the execution of all subsequent items in the project or process flow.
PhilC
Rhodochrosite | Level 12

@fifthand57th

 

No, this idea is a "preemptive" way to stop execution of a node rather than reactionary way due to an error.  

 

That said, this new feature is great! I am totally using it. thanks for contributing.

PhilC
Rhodochrosite | Level 12

@fifthand57th

 

And I'll add, currently when I add a this condition to a node, it is skipped and it does not trigger a stop to "execution of all subsequent items in the project".

fifthand57th
SAS Employee

@PhilC 

 

What is the full version of EG installed plus hot fix? I'd like to test.

 

There was a defect when a project is executed in batch, http://support.sas.com/kb/64324. The bug was corrected via hot fix. Were you running your project interactively or from VBScript?

 

 

PhilC
Rhodochrosite | Level 12

@fifthand57th 

I'm not connecting with what you are suggesting; this is not a bug. I have submitted an EGP file to this thread, (see above) to demonstrate and to communicate my idea better.  I probably should have did this in the beginning, thanks for engaging in this with me.

 

7.15 HF8 (7.100.5.6214) (32-bit), no VB scripting 

 

see the file "Do_Not_Run_Program(3).egp.zip"