OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-11
Creating Files
2. Next, to receive a terminate confirm event, call APS_EVENT_RECEIVE_. In wait
mode, this procedure returns a status code of ZAPS-VAL-STATUS-EVENT when
you receive an event. If APS_EVENT_RECEIVE_ returns a different status code,
to obtain the details of an error at this stage, call APS_STATUS_, specifying as
input the CEPI returned by the FTM_INITIALIZE_REQ_ procedure for this
association.
a. If the association is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the APS_EVENT_RECEIVE_ call and to obtain the status code.
A status code of ZAPS-VAL-STATUS-EVENT means you received an event.
3. If you received an event, call APS_STATUS_ to determine which event. If the event
code is ZFTM-VAL-EVT-TERMINATE-CNF, you have received a terminate confirm.
4. Next, call FTM_TERMINATE_CNF_ to retrieve the data sent by the confirm.
5. Finally, if the remote responder accepts the terminate request, call
APS_DISCARD_ to discard the context information for the association and release
the CEPI.
Creating Files
This section describes the steps to follow to create an FTAM file and gives details on
how to set the parameters of the FTM_CREATE_REQ_ procedure.
Procedure-Call Sequence
Table 4-5 shows the sequence of procedures to call and describes the steps to create
an FTAM file. Note that selection of the newly created file is implicit in the file-create
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.
For information about creating local files compatible with FTAM document types, see
Section 3, NonStop FTAM Programming.
Table 4-5. Calls for Creating an FTAM File (page 1 of 2)
Step Action to Take Procedure(s) to Call
1 Create and select a file in the current file system. FTM_CREATE_REQ_
a. If error returned by FTM_CREATE_REQ_, check
status.
APS_STATUS_
b. If nowait mode, await completion of
FTM_CREATE_REQ_.
MFM_AWAITIOX_
c. If error returned by MFM_AWAITIOX_, check
status.
APS_STATUS_
2 Get the next event. APS_EVENT_RECEIVE_