OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-53
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1598 /* specific error handling or recovery could be */
1599 /* implemented if required by an application. */
1600 /* */
1601 /* Input: None */
1602 /* */
1603 /* Output: Error messages to the terminal */
1604 /* */
1605 /*********************************************************************/
1606
1607 void check_action_diag ()
1608
1609 {
1610
1611 int i; /* index into diagnostic array */
1612
1613 /*******************************************************************/
1614 /* Check the action result for failure and display diagnostic */
1615 /* messages. */
1616 /*******************************************************************/
1617
1618 if ( action_result == ZFTM_VAL_ACTION_FAILURE )
1619 {
1620 /*******************************************************************/
1621 /* Display the number of diagnostic messages received. */
1622 /*******************************************************************/
1623
1624 printf ("Following is a list of %d diagnostic elements -\n",
1625 diag.zdiagcount);
1626
1627 /*******************************************************************/
1628 /* Display the diagnostic message and error ID for each message. */
1629 /*******************************************************************/
1630
1631 for (i = 0; i < diag.zdiagcount; i++)
1632 {
1633 printf (" Diagnostic Type: %ld\n", diag.zdiagelems[i].zdiagtype );
1634 printf (" Error ID: %ld\n", diag.zdiagelems[i].zerrorid );
1635 if (diag.zdiagelems[i].zfurtherdetailsispresent == ZAPS_VAL_PRESENT)
1636 printf (" Details: %s\n",