OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-72
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
622 BEGIN
623 tempbuf ':=' "Invalid TAG" -> @text_ptr;
624 text_len := @text_ptr - @tempbuf;
625 CALL WRITE ( termnum, outbuf, text_len );
626 CALL APS_DISCARD_ ( cepi );
627 CALL ABEND; ! Unknown tag value. !
628 END;
629 END;
630 END; --- End of WHILE loop ---
631
632 !--------------------------------------------------------------------!
633 ! Discard the API context information for the association. !
634 !--------------------------------------------------------------------!
635
636 CALL APS_DISCARD_ ( cepi );
637
638 !--------------------------------------------------------------------!
639 ! Close the local file that was opened for transfer. !
640 !--------------------------------------------------------------------!
641
642 CALL CLOSE ( local_filenum );
643
644 !--------------------------------------------------------------------!
645 ! Display a message to the terminal that an error occurred or that !
646 ! the program completed successfully. !
647 !--------------------------------------------------------------------!
648
649 IF ( file_update_failed ) THEN
650 BEGIN
651 tempbuf ':=' "File update error" -> @text_ptr;
652 END
653 ELSE
654 BEGIN
655 tempbuf ':=' "File update complete" -> @text_ptr;
656 END;
657
658 text_len := @text_ptr - @tempbuf;
659 CALL WRITE ( termnum, outbuf, text_len );
660