TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Examples
NonStop TS/MP Pathsend and Server Programming Manual–132500
B-19
Pathsend Requester Example
IF assign^count >= max^assigns
 THEN ! will exceed the size of our assign table
 BEGIN
 sbuf ':=' "NUMBER OF ASSIGNS EXCEEDS MAX^ASSIGNS" -> @sp;
 CALL WRITE (term^fnum, buf, @sp '-' @sbuf);
 IF <
 THEN ! print an error msg and abend
 CALL IO^error (term^fnum);
 CALL ABEND;
 END;
assign^table [assign^count] ':=' assign^msg FOR (msg^len + 1) / 2;
assign^count := assign^count + 1;
END; ! PROC assign^proc
?PAGE "CANCEL ALL OUR OUTSTANDING I/O"
! This proc is called to cancel I/O posted but not completed. We
! use the io^posted flag in the control block to get the state of
! the I/O.
! This proc is called when one I/O in a transaction failed, either
! at initiation time or completion time.
PROC cancel^outstanding^io (cb^list^head);
INT .EXT cb^list^head (control^block^template); ! ptr to head of cb list
BEGIN
INT .EXT cb (control^block^template) := @cb^list^head;
WHILE @cb <> nil^addr DO
 BEGIN
 IF cb.io^posted
 THEN ! this cb has I/O that hasn't completed
 BEGIN
 CALL CANCELREQ (cb.fnum, @cb);
 IF <
 THEN ! print an error msg and abend
 CALL IO^error (cb.fnum);
 cb.io^posted := false;
 CALL write^trace^file (trace^cancel^request, cb.record^number);
 END;
 @cb := @cb.next^cb;
 END; ! while
END; ! PROC cancel^outstanding^io










