OSI/FTAM Programming Guide
NonStop FTAM Programming
HP NonStop OSI/FTAM Programming Guide—528612-001
3-8
Wait and Nowait Modes
Wait Mode
Procedures called in wait mode wait for the completion or failure of an I/O request,
signalled by the return of a status code from that procedure.
When you call a procedure in wait mode, the procedure does not return control to your
application until the action associated with that procedure has completed or has failed.
In most cases, an FTAM request requires a confirm from the remote FTAM responder.
You must call the APS_EVENT_RECEIVE_ procedure to receive the confirm primitive
completing the service. An APS_STATUS_ call then determines which event was
received. Assuming that the expected primitive was received, you call the appropriate
confirm procedure to retrieve the confirm information.
Association establishment is slightly unusual with respect to the definition of wait
mode; in that case, control returns to the application after the TSP process has
established a connection through the NSP.
Nowait Mode
Nowait mode allows I/O operations to run in the background, concurrently with other
processing. Nowait mode functions similarly for NonStop FTAM associations and
Guardian nowait file operations.
In nowait mode, a procedure initiates an operation but does not wait for I/O operations
to complete. The FTAM API checks the validity of the procedure call and returns any
output that is immediately available. You must later call the MFM_AWAITIOX_
procedure, which waits for the completion of the I/O operation.
Table 3-1. Wait-Mode Procedure Sequence to Establish an Association
Step Action to Take Procedure to Call
1 Establish an FTAM association. FTM_INITIALIZE_REQ_
2 Receive an event on the requested association. APS_EVENT_RECEIVE_
3 Obtain association status information. APS_STATUS_
4 Retrieve confirm information. FTM_INITIALIZE_CNF_
Table 3-2. Typical Nowait-Mode Procedure Sequence to Establish an
Association
Step Action to Take Procedure to Call
1 Establish an FTAM association. FTM_INITIALIZE_REQ_
2 Wait for completion of FTM_INITIALIZE_REQ_. MFM_AWAITIOX_
3 Receive an event on the association. APS_EVENT_RECEIVE_
4 Wait for completion of APS_EVENT_RECEIVE_. MFM_AWAITIOX_
5 Obtain association status information. APS_STATUS_
6 Retrieve confirm information. FTM_INITIALIZE_CNF_