BookmarkSubscribeRSS Feed
EinarRoed
Pyrite | Level 9

I've got a large SAS-program with many data steps. I'm running it in EG 8.3.

 

If for example the 77th data step fails, then the results of all the previous 76 data steps are lost, and connection to the server is lost. So I need to reconnect and rerun all the data steps to get back to where I was.

 

Is there any way to prevent this? If the 77th data step fails, I don't want to lose all my progress and disconnect. I want it to be an isolated failure, so that I can just fix and rerun that particular data step.

3 REPLIES 3
ChrisHemedinger
Community Manager

EG should not disconnect just because a step fails with an error. If the step causes a severe failure (a crash in SAS), then that's a bug in SAS -- which may have a workaround or may require a fix. A crash would cause SAS to disconnect, since it terminates the SAS process. If that's what happens then you should try to capture the SAS log for that step and report to SAS Technical Support.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
ballardw
Super User

@EinarRoed wrote:

I've got a large SAS-program with many data steps. I'm running it in EG 8.3.

 

If for example the 77th data step fails, then the results of all the previous 76 data steps are lost, and connection to the server is lost. So I need to reconnect and rerun all the data steps to get back to where I was.

 

Is there any way to prevent this? If the 77th data step fails, I don't want to lose all my progress and disconnect. I want it to be an isolated failure, so that I can just fix and rerun that particular data step.


If you want data sets to persist then place them in a library you define. The highlighted behavior indicates to me that the sets are being written to the WORK library. Even if a program fails data sets in other libraries would not be "lost". You would just make sure the library was assigned in a another session and they would be there.

 

By any chance have you, or your SAS Admin, set the system option ERRORABEND? That could terminate a SAS session when an error is encountered.

SASKiwi
PROC Star

Setting the SAS option ERRORABEND causes the behaviour you are seeing. Check the setting in your SAS session by running this:

proc options option = errorabend;
run;

If it is set then add this at the top of your program to turn it off:

options noerrorabend;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2907 views
  • 6 likes
  • 4 in conversation