OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-90
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
1324 error := FTM_CANCEL_IND_ ( cepi
1325 , action_result
1326 , diag );
1327
1328 CALL check_error;
1329 CALL check_action_diag;
1330
1331 tempbuf ':=' "The data transfer has been cancelled" -> @text_ptr;
1332 text_len := @text_ptr - @tempbuf;
1333 CALL WRITE ( termnum, outbuf, text_len );
1334
1335 status := FTM_CANCEL_RSP_ ( cepi
1336 , ! action_result !
1337 , ! diag ! );
1338
1339 CALL check_status;
1340
1341 remote_file_update_cmplt := TRUE;
1342
1343 OTHERWISE -> ! Unknown event !
1344
1345 tempbuf ':=' "Invalid Event" -> @text_ptr;
1346 text_len := @text_ptr - @tempbuf;
1347 CALL WRITE ( termnum, outbuf, text_len );
1348 CALL APS_DISCARD_ ( cepi );
1349 CALL ABEND;
1350
1351 END;
1352
1353 !------------------------------------------------------------------!
1354 ! If the file update is not complete, issue another !
1355 ! APS_EVENT_RECEIVE_ to receive the next event. !
1356 !------------------------------------------------------------------!
1357
1358 IF ( remote_file_update_cmplt = FALSE ) THEN
1359 BEGIN
1360 status := APS_EVENT_RECEIVE_ ( cepi
1361 , ! WAIT_FOREVER !
1362 , $dbl (EVENTREC_TAG) );