Error handling on sockets in SAS under OpenVMS -
I am using SAS 9.2 on OpenVMS to connect to external data source on a specified socket with a filename statement :
filename extsrc socket "Exset: Port" recfm = v; Data foo; Infile extract; Input; .... Some statements to read the content ...; Run; This work (as it should be) is 99% time. However, at one time a program that is supposed to listen on the remote port. At present, it causes the program to exit an error:
Error: Connection refused after which we try again , And it generally works, however, it is becoming tedious, so I would like to find this error in the program and deal with it. Does anyone know any way to detect such error in SAS?
I have tried to check the validity of fileref extsrc using the fileref () function, but it only returns -20005, which means that fileref has been assigned but a local file (which That is true) does not point to. The error is obvious only when I use fileref in datastep, so I want to do something on the lines of this:
data _null_; RC = Inflatrift; If RC = 0 again; // what I want to do; End; Do more; // throw some error and try again later; End; Run; [update1] I'm trying the suggestions below, but the problem in true fashion has failed to crop in the last few days, so I'm not sure what the final solution is Is far [/ Update1]
[update2] Error overrun again. According to CMJohnan, the value of syserr after this error is 1012. Now I will see the value of syserr, and if it is unsuccessful then try again many times [/ Update2]
[update3] I have some code that is running for a few days now The extra problem that works is that (of course) if and syserr have an error condition greater than 6, then depending on your errorabend / noerrorabend It is done to completely eliminate the program, or this program will be called obs = 0 syntax shake Due to continuing in D is both undesirable. Setting this code is to set options noerrorabend nosyntaxcheck Additionally, if the error occurs, then clear the file name extsrc And have to re-assign it. Finally, once this piece of code has been completed, if I restore the error bond again if I restore the nosyntaxcheck, then SAS will be able to detect the condition of the previous error and switch to the syntax checking mode at that point. mandatory. [/ Update3]
Did you & amp; Have tried to test the value of syserr? Nothing normally indicates a problem.
You can see the return value. Looking at the I list, I think 1012 or 1020 estimates what you are getting during the socket error.
Comments
Post a Comment