OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-52
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1559
1560 {
1561
1562 /******************************************************************/
1563 /* Check for an error condition and display the error code. */
1564 /******************************************************************/
1565
1566 if ( error != ZAPS_ERR_OK )
1567 {
1568 /*****************************************************************/
1569 /* Display the error code. */
1570 /*****************************************************************/
1571
1572 printf ("ERROR # %d - Association aborted\n", error);
1573
1574 /*****************************************************************/
1575 /* Discard the API context information for the association */
1576 /* and exit the program. */
1577 /******************************************************************/
1578
1579 APS_DISCARD_ ( cepi );
1580 exit (EXIT_SUCCESS);
1581
1582 }
1583
1584 } /* check_error */
1585
1586
1587 #pragma PAGE "CHECK_ACTION_DIAG"
1588 /********************************************************************/
1589 /* */
1590 /* Name: check_action_diag */
1591 /* */
1592 /* Description: The following procedure determines whether the */
1593 /* action requested of a remote responder was */
1594 /* successful or not. If not, the procedure displays */
1595 /* the diagnostic message and error ID for each */
1596 /* diagnostic message element, discards the association,*/
1597 /* and the program exits. Additional application- */