BookmarkSubscribeRSS Feed
SASdevAnneMarie
Rhodochrosite | Level 12

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.

3 REPLIES 3
ChrisHemedinger
Community Manager

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.pngChrisHemedinger_0-1787316491414.png

ChrisHemedinger_1-1787316502703.pngChrisHemedinger_1-1787316502703.png

 

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
SASdevAnneMarie
Rhodochrosite | Level 12
Thank you,Chris!
SYSCC is an automatic variable, so I don't need to create it myself?
ChrisHemedinger
Community Manager

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).

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch Now →
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 56 views
  • 2 likes
  • 2 in conversation