TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Examples
NonStop TS/MP Pathsend and Server Programming Manual–132500
B-17
Pathsend Requester Example
IF (error := SERVERCLASS_SEND_INFO_ (pathsend^error, filesystem^error))
THEN ! problem making the call to SERVERCLASS_SEND_INFO_
BEGIN
CALL serverclass^send^info^error (error);
RETURN;
END;
! Save off the errors and error msg text
cb.pathsend^error := pathsend^error;
cb.file^system^error := filesystem^error;
! This application treats Pathsend errors 916, 918, and 924 as
! retryable. Other errors may be retryable, depending on your
! application. They generally reflect PATHWAY configuration
! problems, and would be retryable after a delay. For example,
! 904 (FEScServerLinkConnect): error with server link connection
! (Open, I/O, etc.).
! 905 (FEScNoServerAvailable): no server in the requested server
! class has a free link. the maximun number of links is specified
! in PATHCOM by the server class attribute MAXLINKS. A link could
! become available if a TCP was shutdown.
! 913 (FEScServerClassFrozen): the server class is frozen.
! 916 (FEScServerCreationFailure): send denied by PATHMON because
! of a server creation failure.
! 918 (FEScSendOperationAborted): the send operation was
! terminated. See file system error for more information. For
! example, corresponding file system error could be error 40,
! time out.
! 924 (FEScTooManySendRequests): the maximum number of allowed
! send requests has been exceeded.
IF (pathsend^error = FEScServerCreationFailure !916!
OR pathsend^error = FEScOperationAborted !918!
OR pathsend^error = FEScTooManySendRequests !924!)
THEN ! we'll retry the SERVERCLASS_SEND_
cb.error^is^retryable := true
ELSE ! store error msg text, trap parameter errors
BEGIN
cb.pathsend^error^msg ':=' "PATHSEND ERROR: " -> @sp;
CALL DNUMOUT (sp, $UDBL (pathsend^error), 10, 3);
@sp := @sp[3];
cb.file^system^error^msg ':=' "FILE SYSTEM ERROR: " -> @st;
CALL DNUMOUT (st, $UDBL (filesystem^error), 10, 3);
@st := @st[3];
! Use the pathsend error to check for parameter errors, and flag
! them as non-retryable. Alternatively, we could use the value
! returned in the file system error to trap a bad param (error 2:
! FEInvalidOp, error 21: FEBadCount, error error 22: FEBadParam,
! error 29: FEMissParam).
!
! The pathsend error does provide more specific information about
! about the problem. For example, pathsend errors 907, 908, 909,
! and 919 all return the same file system error (error 2,
! FEInvalOp).