OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-100
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
1714 CALL APS_DISCARD_ ( cepi );
1715 CALL ABEND;
1716
1717 END;
1718
1719 END; --- check_status ---
1720
1721
1722 ?PAGE "proc CHECK_ERROR"
1723 !--------------------------------------------------------------------!
1724 ! !
1725 ! Name: check_error !
1726 ! !
1727 ! Description: The following procedure checks the error code !
1728 ! returned from an FTM or APS procedure. If it !
1729 ! detects an error, the procedure displays the error !
1730 ! code, discards the association, and the program !
1731 ! exits. Additional application-specific error !
1732 ! handling or recovery could be implemented if !
1733 ! required by an application. !
1734 ! !
1735 ! Input: None !
1736 ! !
1737 ! Output: Error message to the terminal !
1738 ! !
1739 !--------------------------------------------------------------------!
1740
1741 PROC check_error;
1742
1743 BEGIN
1744
1745 !------------------------------------------------------------------!
1746 ! Check for an error condition and display the error code. !
1747 !------------------------------------------------------------------!
1748
1749 IF ( error <> ZAPS^ERR^OK ) THEN
1750 BEGIN
1751 !-----------------------------------------------------------------!
1752 ! Display the error code. !