DATA Step, Macro, Functions and more

SAS hangs at "ERROR: Undetermined I/O failure." Can I get it to quit instead of hang?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

SAS hangs at "ERROR: Undetermined I/O failure." Can I get it to quit instead of hang?

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?


Accepted Solutions
Solution
‎10-10-2014 04:27 PM
Super User
Posts: 10,500

Re: SAS hangs at "ERROR: Undetermined I/O failure." Can I get it to quit instead of hang?

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.

View solution in original post


All Replies
Solution
‎10-10-2014 04:27 PM
Super User
Posts: 10,500

Re: SAS hangs at "ERROR: Undetermined I/O failure." Can I get it to quit instead of hang?

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.

Occasional Contributor
Posts: 10

Re: SAS hangs at "ERROR: Undetermined I/O failure." Can I get it to quit instead of hang?

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.

SAS Employee
Posts: 17

Re: SAS hangs at "ERROR: Undetermined I/O failure." Can I get it to quit instead of hang?

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.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 1849 views
  • 3 likes
  • 3 in conversation