TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Examples
NonStop TS/MP Pathsend and Server Programming Manual–132500
B-21
Pathsend Requester Example
! An error or warning occurred
CALL FILEINFO (fnum, error);
IF <>
 THEN ! couldn't access the ACB
 CALL abend^with^my^abend^msg;
! Check for a timeout error
IF error = 40
 THEN ! AWAITIO timed out and no completion has occurred
 BEGIN
 sbuf ':=' "AWAITIO TIMED OUT (ERROR 40)" -> @st;
 CALL WRITE (error^log^fnum, buf, @st '-' @sbuf);
 IF <
 THEN ! print an error msg and abend
 CALL IO^error (error^log^fnum);
 CALL write^trace^file (trace^io^timed^out);
 ! Save the error msg so we can include it in the output record
 global^non^pathsend^error^msg ':=' sbuf FOR @st '-' @sbuf;
 RETURN nil^addr;
 END;
! I/O completed with some error, find out what it is
@cb := tag;
! We expect the file number returned by AWAITIOX to be the same as
! the fle number we saved in the control block when the I/O was
! initiated.
IF cb.fnum <> fnum
 THEN ! assertion failed
 CALL abend^with^my^abend^msg;
cb.io^posted := false;
CALL write^trace^file (trace^io^failed, cb.record^number);










