TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Pathsend Procedure Call Reference
NonStop TS/MP Pathsend and Server Programming Manual–132500
5-25
Server-Class Send Operation Number
A value of -1 is returned for nowait send operations that are not initiated successfully. A
value of -1 is always returned for waited send operations.
Calling AWAITIOX
You can use the server-class send operation number as the file number in calls to the
AWAITIOX procedure to wait for completion of any outstanding
SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_, or
SERVERCLASS_DIALOG_SEND_ operation. Alternatively, you can specify -1 as the
file number to AWAITIOX to wait for completion of any outstanding I/O operation,
including calls to SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_, or
SERVERCLASS_DIALOG_SEND_. When completion of one of these calls occurs,
you can identify the specific call by the tag returned by AWAITIOX. (You cannot use
the AWAITIO—without the X—procedure to complete a nowait server-class send
operation. The SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_, and
SERVERCLASS_DIALOG_SEND_ procedures use a 32-bit extended message buffer
address, and AWAITIO cannot be used to complete extended I/O operations.)
For an example of one way to use AWAITIOX, see the Pathsend program example
BREQ, Example B-1
on page B-2. In this TAL example, the procedure complete^io
waits for completion of an I/O operation on any file and identifies the I/O operation by
the tag returned by AWAITIOX. You can also see how this procedure calls AWAITIOX.
If AWAITIOX returns with an error (condition code CCL), it calls FILEINFO to retrieve
the error code. If the error returned is 233 (FEScError),
SERVERCLASS_SEND_INFO_ is called to get the specific Pathsend error and
file-system error.
Canceling a Server-Class Send Operation
You cancel an outstanding SERVERCLASS_SEND_,
SERVERCLASS_DIALOG_BEGIN_, or SERVERCLASS_DIALOG_SEND_
operation by using the Guardian CANCEL or CANCELREQ procedure if you have used
the nowait option in the Pathsend procedure call and have not yet received notification of
completion of the server-class send operation with the AWAITIOX procedure. Note that
if the AWAITIOIX call was completed with a Pathsend error, such as a server-class send
timeout error (described in the following subsection), this is still a completion; in such
cases, you should not call CANCEL or CANCELREQ.
Calling CANCEL or CANCELREQ has the following effects on your Pathsend
program:
•
The program is not affected by any reply to the SERVERCLASS_SEND_,
SERVERCLASS_DIALOG_BEGIN_, or SERVERCLASS_DIALOG_SEND_ call.
•
The program cannot determine whether the request message has been sent to a
server process, and if it was sent, whether or not it was canceled before the server
process finished processing the request.
Note. Passing the server-class send operation number as a filenum parameter to Guardian
procedures other than AWAITIOX, CANCEL, CANCELREQ, and FILEINFO results in file-
system error 2 (FEInvalOp).