OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-149
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1675
1676 /*******************************************************************/
1677 /* Display the error code and subcode. */
1678 /*******************************************************************/
1679
1680 printf ( "ERROR CODE : %d ERROR SUBCODE : %d\n",
1681 error_code, error_subcode );
1682
1683 /********************************************************************/
1684 /* Display the original error code and error subcode. */
1685 /********************************************************************/
1686
1687 printf ("ORIGINAL ERROR INFO -\n");
1688 printf (" SERVICE ID : %d\n", original_error_info.zerror.zservice_id );
1689 printf (" ERROR CODE : %d\n", original_error_info.zerror.zerror_code );
1690 printf (" ERROR SUBCODE : %d\n",
1691 original_error_info.zerror.zerror_subcode );
1692
1693 /*******************************************************************/
1694 /* Perform error handling, depending on the status value returned. */
1695 /* Additional application-specific error handling or recovery */
1696 /* could be implemented depending on application requiremen */
1697 /*******************************************************************/
1698
1699 switch ( status )
1700 {
1701
1702 case ZAPS_VAL_STATUS_NO_RETRY:
1703 case ZAPS_VAL_STATUS_RETRY_LATER:
1704
1705 {
1706 /**************************************************************/
1707 /* The status indicates an error was detected. This */
1708 /* application aborts both associations and exits. */
1709 /**************************************************************/
1710
1711 abort_discard ();
1712 exit (EXIT_SUCCESS);
1713