TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)

Examples
NonStop TS/MP Pathsend and Server Programming Manual132500
B-16
Pathsend Requester Example
IF (tmf^error := ABORTTRANSACTION)
THEN ! failed to abort, file sys error in tmf^error
BEGIN
sbuf ':=' "ERROR WITH ABORTTRANSACTION: " -> @sp;
CALL NUMOUT (sp, tmf^error, 10, 3);
@sp := @sp[3];
CALL WRITE (error^log^fnum, buf, @sp '-' @sbuf);
IF <
THEN ! print an error msg and abend
CALL IO^error (error^log^fnum);
CALL ABEND;
END;
! Successfully aborted the transaction
CALL write^trace^file (trace^abort^transaction);
sbuf ':=' "TRANSACTION ABORTED NORMALLY" -> @sp;
CALL WRITE (error^log^fnum, buf, @sp '-' @sbuf);
IF <
THEN ! print an error msg and abend
CALL IO^error (msg^log^fnum);
END; ! PROC abort^tmf^transaction
?PAGE "FIND OUT WHY SERVERCLASS_SEND_ FAILED"
! The following procedure is called from PROCs complete^io and
! initiate^IO. That is, SERVERCLASS_SEND_ and AWAITIOX can both
! return file system error 233 (FESCERROR).
! This proc gets detailed information about error 233 by calling
! SERVERCLASS_SEND_INFO_ , which returns the pathsend error and
! the file system error.
PROC analyze^send^error^233 (cb);
INT .EXT cb (control^block^template);
BEGIN
STR .EXT sp;
STR .EXT st;
INT error; ! used in call to serverclass_send_info_
INT pathsend^error; ! used in call to serverclass_send_info_
INT filesystem^error; ! used in call to serverclass_send_info_
! Default to a non-retryable error
cb.error^is^retryable := false;