OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-33
The File Close Procedure
3. If you received an event, call APS_STATUS_ to determine which event. If the event
code is ZFTM-VAL-EVT-CLOSE-CNF, you received a close confirm.
4. Next, call FTM_CLOSE_CNF_ to retrieve the data sent by the confirm. Check the
action-result output parameters.
If the action-result value is ZFTM-VAL-ACTION-SUCCESS, the file has been
closed.
The File Close Procedure
Table 4-13 gives the sequence of procedure calls needed to close, deselect, and
optionally delete an FTAM file, using FTM_FILE_CLOSE_REQ_, a grouped procedure.
Sometimes you can omit a procedure call associated with a substep, depending on the
context. The sequence of procedures is explained after the table.
To use this procedure, the initiator and remote responder must have negotiated the
grouping functional unit via the func-units parameter of the
FTM_INITIALIZE_REQ_ procedure. For more information on the grouping of
procedure calls, refer to Grouping Control on page 4-15.
These steps explain the sequence of procedure calls given in Table 4-13. Before these
calls are made, the initiator and remote responder must agree to the grouping
functional unit via the func-units parameter of the FTM_INITIALIZE_REQ_ call.
1. The FTM_FILE_CLOSE_REQ_ procedure both closes and deselects a file. You
can also delete the file if you specify deletion in the delete-action parameter.
Table 4-13. Calls for Closing an FTAM File Using FTM_FILE_CLOSE_REQ_
Step Action to Take Procedure(s) to Call
1 Close, deselect, and optionally delete a file. FTM_FILE_CLOSE_REQ_
a. If error returned by FTM_FILE_CLOSE_REQ_,
check status.
APS_STATUS_
b. If nowait mode, await completion of
FTM_FILE_CLOSE_REQ_.
MFM_AWAITIOX_
c. If error returned by MFM_AWAITIOX_, check
status.
APS_STATUS_
2 Get the next event. APS_EVENT_RECEIVE_
a. If nowait mode, await completion of
APS_EVENT_RECEIVE_.
MFM_AWAITIOX_
3 Check status: Is the event a file-close confirm? Or, if
APS_EVENT_RECEIVE_ returns a status other than
ZAPS-VAL-STATUS-EVENT, is there an error?
APS_STATUS_
4 Retrieve service confirm information. FTM_FILE_CLOSE_CNF_