I have several programs that make a call like this.
monitor;
http_post_stmf(peURL: pePostFile: peRecvFile: peTimeout:
peUserAgent: peContentType: peSOAPAction);
on-error ;
// do stuff
leavesr;
endmon;
After doing some research I have decide that I should be doing this differently. Something like this.
dcl-s rc = int(10);
monitor;
rc = http_post_stmf(peURL: pePostFile: peRecvFile: peTimeout:
peUserAgent: peContentType: peSOAPAction);
if rc <> 1 ; // Returns -1 upon failure, 0 upon timeout, 1 for success, or an HTTP response code
msg = http_error;
// do stuff
return;
endif;
on-error ;
// do stuff
leavesr;
endmon;
So the real question is:
In my current code what happens in a timeout (or some other failure) situation?
monitor;
http_post_stmf(peURL: pePostFile: peRecvFile: peTimeout:
peUserAgent: peContentType: peSOAPAction);
on-error ;
// do stuff
leavesr;
endmon;
After doing some research I have decide that I should be doing this differently. Something like this.
dcl-s rc = int(10);
monitor;
rc = http_post_stmf(peURL: pePostFile: peRecvFile: peTimeout:
peUserAgent: peContentType: peSOAPAction);
if rc <> 1 ; // Returns -1 upon failure, 0 upon timeout, 1 for success, or an HTTP response code
msg = http_error;
// do stuff
return;
endif;
on-error ;
// do stuff
leavesr;
endmon;
So the real question is:
In my current code what happens in a timeout (or some other failure) situation?
Comment