TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Examples
NonStop TS/MP Pathsend and Server Programming Manual–132500
B-31
Pathsend Requester Example
! Also note that the <actual-reply-len> param is an optional
! reference param that has a return value of 0 for nowaited I/O.
error := SERVERCLASS_SEND_ (cb.pathmon^system^and^process^name,
 pathmon^process^name^len,
 cb.serverclass^name,
 serverclass^name^len,
 cb.pathsend^req^buf,
 $LEN (pathsrv^request^template),
 $LEN (pathsrv^reply^template),
 , ! actual reply len for waited I/O only !
 timeout,
 flags,
 ^ScSendOpNum,
 @cb !tag! );
IF error = FEok !0!
 THEN ! successfully initiated the Pathsend send
 BEGIN
 cb.ScSend^OpNum := ^ScSendOpNum;
 cb.io^posted := true;
 CALL write^trace^file (trace^pathsend, cb.record^number);
 RETURN true;
 END;
! The send failed with an initiation error. Find out
! what happened.
cb.io^posted := false;
IF error = FESCError !file system error 233!
 THEN ! call SERVERCLASS_SEND_INFO to get Pathsend and file system errors
 CALL analyze^send^error^233 (cb)
 ELSE ! we should only see errors 0 or 233
 CALL abend^with^my^abend^msg;
RETURN false;
END; ! PROC initiate^IO










