OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-171
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
388 CALL CLOSE ( fn );
389
390 !------------------------------------------------------------------!
391 ! Allocate and initialize a segment used by the FTM and APS !
392 ! procedures. !
393 !------------------------------------------------------------------!
394
395 error := APS_INITIALIZE_ ( ! swapvol ! );
396 IF ( error <> ZAPS^ERR^OK ) THEN
397 BEGIN
398 tempbuf ':=' "Initialization of the FTAM/APS segment failed"
399 -> @text_ptr;
400 text_len := @text_ptr - @tempbuf;
401 CALL WRITE ( termnum, outbuf, text_len );
402 CALL STOP;
403 END;
404
405
406 !------------------------------------------------------------------!
407 ! Establish the source-file FTAM regime. !
408 !------------------------------------------------------------------!
409
410 !------------------------------------------------------------------!
411 ! The following sections initialize the various parameters !
412 ! for the FTM_INITIALIZE_REQ_ procedure. !
413 !------------------------------------------------------------------!
414
415 !------------------------------------------------------------------!
416 ! Set the wait mode for the association to wait and initialize the !
417 ! APLMGR process name. !
418 !------------------------------------------------------------------!
419
420 wait_mode := ZAPS^VAL^WAITED;
421 aplmgr_name ':=' manager_name FOR $occurs (manager_name) BYTES;
422
423 !------------------------------------------------------------------!
424 ! Supply the remote and local OSI addresses or common names. !
425 ! This application uses the common name. Set the length fields of !
426 ! the OSI addresses to 0. !