Is there a timeout function in VMS

October 17, 2011 at 06:39:41
Specs: OpenVMS
Hi

I have a VMS script that has a tendency to hang of certain servers. Is there a timeout function can add to stop this happening?

Thanks in advance


See More: Is there a timeout function in VMS

Report •


#1
October 18, 2011 at 06:48:14
It depends on what the script is (DCL ?) and doing:
If it hangs on DCL READ from the network connection: add a /TIME_OUT qualifier (see HELP READ /TIME_OUT.
If it hangs inside some program using standard socket read/write:
try to set a timeout using setsockopt() like
timo.tv_sec=4; timo.tv_usec=0;
if (setsockopt(*sock,SOL_SOCKET,SO_RCVTIMEO,&timo,sizeof(timo))) perror("Setsockopt failed");
if (setsockopt(*sock,SOL_SOCKET,SO_SNDTIMEO,&timo,sizeof(timo))) perror("Setsockopt failed");

If You tell us more what the script is doing , a more directed answer could be given.

Joseph Huber
http://www.huber-joseph.de


Report •
Related Solutions


Ask Question