OSI/FTAM Programming Guide
Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide—528612-001
4-45
Procedure-Call Sequence
These steps explain the sequence of procedure calls given in Table 4-17 on page 4-44.
1. To request the transfer of some or all the data from the previously opened file on a 
remote system, call FTM_READ_REQ_, specifying details about the file from 
which you wish to read (for information on the parameters of this procedure, see 
the following subsection).
a. If the read 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_READ_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 data indication 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-DATA-IND, you received a data indication. If the 
event code is ZFTM-VAL-EVT-DATAEND-IND, you received a data-end indication; 
go to Step 7.
4. Call FTM_DATA_IND_ to transfer a block of data from the previously opened file. 
The FTM_READ_REQ_ procedure, described above, initiates this transfer. 
Repeat the sequence of steps 2, 3, and 4 as many times as necessary to transfer 
all the data. Depending on the size of the buffer, you might need to check the 
more-data byte count to see if more data is available. To determine the size of 
data buffer needed, on the first call to FTM_DATA_IND_ set buffer-size and 
start-position to zero; if you do so, the more-data output parameter 
indicates the size, in octets, of the data to be read. For additional details on 
Note. Besides the expected event, you might also receive a cancel event. Both the local 
application and the remote responder can issue a cancel request at any time.










