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.
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.
@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.
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;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.