OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-205
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1714 ! Description: The check_status procedure checks the status returned !
1715 ! from an FTM or APS procedure call. It checks for !
1716 ! NORETRY, RETRYLATER, and DISCARD. If status is OK, !
1717 ! it returns control to the main program. If status !
1718 ! is not OK, it displays a message, discards the !
1719 ! associations and exits the program. !
1720 ! !
1721 ! Input: CEPI identifying the association whose status is !
1722 ! being checked !
1723 ! !
1724 ! Output: Error messages to terminal !
1725 ! !
1726 !---------------------------------------------------------------------!
1727
1728 PROC check_status ( cepi );
1729
1730 INT cepi;
1731
1732 BEGIN
1733
1734 !------------------------------------------------------------------!
1735 ! Check for a good status. !
1736 !------------------------------------------------------------------!
1737
1738 IF ( status = ZAPS^VAL^STATUS^OK ) THEN
1739 BEGIN
1740 RETURN;
1741 END;
1742
1743 !------------------------------------------------------------------!
1744 ! Get the error code and error subcode values. !
1745 !------------------------------------------------------------------!
1746
1747 error := APS_STATUS_ ( cepi
1748 , ! event_code !
1749 , ! device_name !
1750 , error_code
1751 , error_subcode
1752 , ! service_id !