OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-28
The File Open Procedure
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_FILE_OPEN_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. Next, to receive a file-open 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 have received an event, call APS_STATUS_ to determine which event. If the
event code is ZFTM-VAL-EVT-FILEOPEN-CNF, you received a file-open confirm.
4. Next, call FTM_FILE_OPEN_CNF_ to retrieve the data sent by the confirm. Check
the state-result and action-result output parameters.
If the state-result value is ZFTM-VAL-STATE-SUCCESS and the
action-result value is ZFTM-VAL-ACTION-SUCCESS, the file has been
created or selected, and opened.
Setting Procedure Parameters
To provide details about the previously selected file you wish to open, use these
parameters of the FTM_OPEN_REQ_ procedure:
1. The filename (ZAPS-DDL-CHAR128) parameter names the remote file to be
selected. The name should be fully qualified, as required by the remote system, to
uniquely identify the file. The name can have up to 128 characters.
2. The file-status parameter specifies whether an existing file should be selected
or a new file created, and if a new file is created, how that file’s attributes should be
determined. Valid values for this parameter are listed in this table. If this parameter
is not specified, the default value will be ZFTM-VAL-FOPEN-OLD.