Desktop productivity for business analysts and programmers

options errorabend

Accepted Solution Solved
Reply
Contributor
Posts: 42
Accepted Solution

options errorabend

Hello - Can someone just advise me if this should work and if I'm just not doing something correctly please? 

 

I have a load of SAS scripts that are joined together in a process flow. There about 35 scripts.

 

I just want it to stop executing the flow (so subsequent steps) if an error occurs. 

 

I've put the below at the start, and thought this would do the trick:

 

options errorabend;
options ERRORCHECK=STRICT;
run;

 

I've done this on a test flow, which is just three scripts - First script designed to generate an error, and the subsequent scripts would just put a word in the log. If the options errorabend stuff is in the first script and I run the flow, the flow stops after it finds the error in the first script. (This is what I want). If I comment out the options errorabend stuff, the flow exectutes the remaining scripts (not what I want). 

 

I thought this would be fine, but when implemented into my real flow, the flow still runs the subsequent scripts! Even though, in the log, it says "SAS has ended due to error". 

 

Is this the right way to just get my flow to STOP as soon as an error is encoutered? That's all I want it to do.. I am using EG 7.12 - I know if 7.13 there will be an option in the properties for a script to do what I want, but I haven't got it yet. 

 


Accepted Solutions
Solution
‎09-27-2017 05:22 AM
Super User
Posts: 9,551

Re: options errorabend

Set a macro variable and use it in a condition attached to the following node(s). When EG loses connection to the workspace server (a consequence of the errorabend option), it simply starts a new WS when requested to execute a node. So you need to keep the node from executing, and that's what the conditions are for.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

View solution in original post


All Replies
Solution
‎09-27-2017 05:22 AM
Super User
Posts: 9,551

Re: options errorabend

Set a macro variable and use it in a condition attached to the following node(s). When EG loses connection to the workspace server (a consequence of the errorabend option), it simply starts a new WS when requested to execute a node. So you need to keep the node from executing, and that's what the conditions are for.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 42

Re: options errorabend

[ Edited ]
Posted in reply to KurtBremser

Ok thanks. I've just realised that 7.15 is ready to download, so I'm going to update to that instead so that I have the project properties option to stop current branch on errors. 

 

Cheers

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 274 views
  • 0 likes
  • 2 in conversation