OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-151
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1753 /*********************************************************************/
1754 /* */
1755 /* Name: check_error */
1756 /* */
1757 /* Description: The check_error procedure checks error codes */
1758 /* returned by FTM procedure calls. If an error */
1759 /* code indicates that an error occurred, this */
1760 /* procedure displays a message, then aborts the */
1761 /* associations to the two remote systems and exits */
1762 /* the program. */
1763 /* */
1764 /* Input: None */
1765 /* */
1766 /* Output: Error messages to terminal */
1767 /* */
1768 /*********************************************************************/
1769
1770 void check_error ()
1771
1772 {
1773
1774 /*******************************************************************/
1775 /* Check for an error condition. */
1776 /*******************************************************************/
1777
1778 if ( error != ZAPS_ERR_OK )
1779 {
1780
1781 /*****************************************************************/
1782 /* Display the error code. */
1783 /*****************************************************************/
1784
1785 printf ( "ERROR # %d\n", error );
1786 printf ( "Association discarded\n" );
1787
1788 /*****************************************************************/
1789 /* Abort both associations and exit the program. */
1790 /*****************************************************************/
1791