SAS 9.3 on Windows Server 2003 (yes, I know, will be moving to 2012 soon).
I have a Windows scheduled task that executes a SAS job to collect some data and append it to a data set.
Most of the time it works fine. Occasionally it fails, pops up a window (even though it's running in noninteractive mode) showing "ERROR: Undetermined I/O failure." and just waits forever for me to close the window. And while it's in that state, later scheduled executions can't happen.
Well, I don't care if it fails once in a while. I just want it to abort instead of hang, so the next scheduled run will run. Is there a way of getting that behaviour?
Options errorabend; at the start of the program MIGHT work. It may be that what you are getting is an OS error and not a SAS error, in which case SAS may not be able to determine it is in an error condition.
Note that errorabend will also terminate for other errors, so use carefully.
Options errorabend; at the start of the program MIGHT work. It may be that what you are getting is an OS error and not a SAS error, in which case SAS may not be able to determine it is in an error condition.
Note that errorabend will also terminate for other errors, so use carefully.
Thanks, ballardw and scmebu. Options errorabend; worked so well that I never got around to trying -unbuflog.
The frequency of the job hanging dropped sharply.
Remaining hangs were attributable not to SAS itself but to curl (called from the SAS job) waiting forever. Using curl option --max-time took care of that nicely.
I also moved to from SAS 9.3 to 9.4 and Windows Server 2003 to 2012 at the same time, though that didn't seem to make any difference itself.
Also, try using the -unbuflog option when running SAS on this job. If there's a crash and traceback information that's being lost when SAS hangs then this might ensure that information gets written to the log.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.