OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-192
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1207 access_context.zcntxt := ZFTM^VAL^ACCESSCNTXT^UA;
1208 access_context.zlevelnumispresent := ZAPS^VAL^ABSENT;
1209
1210 status := FTM_WRITE_REQ_ ( dst_cepi
1211 , dst_fadu_op
1212 , dst_fadu_id );
1213 CALL check_status ( dst_cepi );
1214
1215 status := FTM_READ_REQ_ ( src_cepi
1216 , src_fadu_id
1217 , access_context );
1218 CALL check_status ( src_cepi );
1219
1220
1221 !------------------------------------------------------------------!
1222 ! Wait for a data indication from the source association. As each !
1223 ! indication is received, call FTM_DATA_IND_ to retrieve the data !
1224 ! and then FTM_DATA_REQ_ to send the data to the destination !
1225 ! system. !
1226 ! !
1227 ! Repeat this process until a data-end indication arrives from the !
1228 ! source or a cancel or abort indication is received from either !
1229 ! system. !
1230 !------------------------------------------------------------------!
1231
1232 DO
1233 BEGIN
1234
1235 !------------------------------------------------------------------!
1236 ! Wait for either a data indication, a data-end indication, or a !
1237 ! cancel indication from the source system. Set event to ANYEVENT !
1238 ! since more than one event code is valid. !
1239 !------------------------------------------------------------------!
1240
1241 event := ANYEVENT;
1242 CALL get_event ( event, src_cepi );
1243
1244 IF ( event = ZFTM^VAL^EVT^DATA^IND ) THEN
1245 BEGIN