OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-49
Generating Cancels
an error at this stage, call APS_STATUS_, specifying as input the CEPI
returned by the FTM_INITIALIZE_REQ_ procedure for this association.
b. If the association is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the FTM_CANCEL_RSP_ procedure call.
c. If you call MFM_AWAITIOX_ and the status code returned is not
ZAPS-VAL-STATUS-OK, call APS_STATUS_, specifying as input the CEPI
returned by the FTM_INITIALIZE_REQ_ procedure for this association.
After the FTM_CANCEL_RSP_ call successfully completes, the association is left in
the file-open regime. You can either call the read or write request again to continue the
operation in progress when you received the cancel indication, or close and deselect
the file previously selected and opened for the transfer and terminate the association.
Generating Cancels
Table 4-19 shows the sequence of procedures to call and describes the steps to cancel
a data transfer. Sometimes you can omit a procedure call associated with a substep,
depending on the context. The sequence of procedures is explained after the table.
In general, the state of a data transfer is unknown after a cancel operation. After you
have received the cancel indication from the responding system, you can resume the
operation in progress at the time of the cancel by calling the FTM_READ_REQ_ or
FTM_WRITE_REQ_ procedure. The association is left in the file-open regime after a
cancel operation, and the normal practice for an application is to repeat the data
transfer from the beginning.
The exception to this rule is that, if the application was reading an FTAM-2 file, it
should be able to resume reading at the next node in the traversal sequence. You can
also choose to terminate the association after closing and deselecting the file
previously selected and opened for the transfer.
Table 4-19. Calls for Generating Cancels (page 1 of 2)
Step Action to Take Procedure(s) to Call
1 Issue a cancel request. FTM_CANCEL_REQ_
a. If error returned by FTM_CANCEL_REQ_, check
status.
APS_STATUS_
b. If nowait mode, await completion of
FTM_CANCEL_REQ_.
MFM_AWAITIOX_
c. If error returned by MFM_AWAITIOX_, check status. APS_STATUS_
2 Get the next event. APS_EVENT_RECEIVE_