OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-40
Procedure-Call Sequence
These steps explain the sequence of procedure calls given in Table 4-16 on page 4-39.
1. To request a data transfer from the local NonStop system to a previously opened
file on a remote system, call FTM_WRITE_REQ_, specifying details about the file
to which you wish to write (for information on the parameters of this procedure, see
the following subsection).
a. If the procedure succeeds, it returns a status code of ZAPS-VAL-STATUS-OK.
If the procedure fails, it 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.
b. If the association is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the FTM_WRITE_REQ_ call. MFM_AWAITIOX_ gives you the
status code for the completed procedure call. For more information on the
MFM_AWAITIOX_ procedure, refer to the OSI/FTAM Programming Reference
Manual.
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.
2. To transfer a block of data to a previously opened file, call FTM_DATA_REQ_. Use
the data-value parameter to specify the data to transfer. For details on
transferring data and using data-value, see Section 3, NonStop FTAM
Programming.
a. If the data request procedure fails, it returns a status code other than
ZAPS-VAL-STATUS-OK. 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.
b. If the association is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the FTM_DATA_REQ_ call. MFM_AWAITIOX_ gives you the
status code for the completed 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.
Repeat step 2 as many times as necessary to complete the data transfer.
3. Call FTM_DATA_END_REQ_ to signify the end of the data transfer that the
FTM_WRITE_REQ_ procedure initiated.
a. If the data-end procedure fails, it returns a status code other than
ZAPS-VAL-STATUS-OK. To obtain the details of an error, 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_DATA_END_REQ_ call.