Hello experts,
I am running SAS code in SAS Enterprise Guide 8.3 using an Ordered List. I would like to know if there is an option to stop the execution when one of the programs encounters an error.
Thank you.
You should be able to add a Condition to the item in your process flow. The condition can be based on different criteria, but the easiest method is to check a macro variable. You can use SYSCC (built in error code that you can reset), or you can set a macro variable to indicate some other "error" condition (such as a data set that doesn't exist).
When you add your items to the Ordered List, the condition is still evaluated and the node won't run if the condition isn't met.
ChrisHemedinger_0-1787316491414.png
ChrisHemedinger_1-1787316502703.png
Yes, SYSCC is automatic and will have a non-zero value if an error occurs. But you can/should clear it with "%let SYSCC=0;" to reset it when you want to start from a clean slate.
SYSERR is another automatic variable, but you cannot reset that in the session (it is read-only).
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.