OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-27
The File Open Procedure
Procedure-Call Sequence
Table 4-11 shows the sequence of procedures to call and describes the steps to
optionally create, select, and open an FTAM file, using FTM_FILE_OPEN_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 FTM_FILE_OPEN_REQ_, you must have negotiated the grouping functional
unit using the func-units parameter of the FTM_INITIALIZE_REQ_ procedure. For
more information, refer to Grouping Control on page 4-15.
These steps explain the sequence of procedure calls given in Table 4-11.
1. Issue the FTM_FILE_OPEN_REQ_ procedure to select and open a file. If the file
does not already exist, you can create it if you specify ZFTM-VAL-FOPEN-NEW in
the file-status parameter of this call. For information on setting the parameters
of this procedure, see the following subsection.
The FTM_FILE_OPEN_REQ_ call issues these FTAM primitives:
F-BEGIN-GROUP request
F-SELECT request or F-CREATE request, depending on file-status. If the
value of file-status is ZFTM-VAL-FOPEN-OLD, the F-SELECT request
primitive is called. Otherwise, this procedure calls the F-CREATE request
primitive.
F-OPEN request
F-END-GROUP request
Table 4-11. Calls for Opening an FTAM File Using FTM_FILE_OPEN_REQ_
Step Action to Take Procedure(s) to Call
1 Optionally create, select, and open a file. FTM_FILE_OPEN_REQ_
a. If error returned by FTM_FILE_OPEN_REQ_,
check status.
APS_STATUS_
b. If nowait mode, await completion of
FTM_FILE_OPEN_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-open 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_OPEN_CNF_