OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-99
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
1675 BEGIN
1676 status := FTM_U_ABORT_REQ_ ( cepi
1677 , ! action_result !
1678 , ! diag !
1679 , $dbl (ABORT_TAG) );
1680
1681 !------------------------------------------------------------!
1682 ! If the above abort request is sent to the remote system, !
1683 ! calling the main procedure sets the remote_file_update_cmplt flag,!
1684 ! and the program is terminated. If the request is not sent !
1685 ! out, set the flag here and return to the main procedure. !
1686 !------------------------------------------------------------!
1687
1688 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
1689 BEGIN
1690 remote_file_update_cmplt := TRUE;
1691 END;
1692
1693 tempbuf ':=' "The association has been aborted" -> @text_ptr;
1694 text_len := @text_ptr - @tempbuf;
1695 CALL WRITE ( termnum, outbuf, text_len );
1696 END;
1697
1698
1699 ZAPS^VAL^STATUS^DISCARD ->
1700 !--------------------------------------------------------------!
1701 ! The operation failed because the association was lost. !
1702 ! Indicate that the file update completed with a failure. !
1703 ! The API context information for the association is discarded !
1704 ! in the main processing loop for this application. !
1705 !--------------------------------------------------------------!
1706
1707 remote_file_update_cmplt := TRUE;
1708
1709 OTHERWISE -> ! Unknown status value !
1710
1711 tempbuf ':=' "Unknown Status" -> @text_ptr;
1712 text_len := @text_ptr - @tempbuf;
1713 CALL WRITE ( termnum, outbuf, text_len );