OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-156
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1948
1949
1950 #pragma PAGE "CHECK_ACTION_DIAG"
1951 /*********************************************************************/
1952 /* */
1953 /* Name: check_action_diag */
1954 /* */
1955 /* Description: The check_action_diag procedure determines whether */
1956 /* the action requested of a remote responder was */
1957 /* successful or not. If not, the procedure displays */
1958 /* the diagnostic message type and error ID for each */
1959 /* diagnostic message element, calls abort_discard, and */
1960 /* ends the program. Additional application-specific */
1961 /* error handling or recovery could be implemented if */
1962 /* required by an application. */
1963 /* */
1964 /* Input: None */
1965 /* */
1966 /* Output: Error message to terminal */
1967 /* */
1968 /*********************************************************************/
1969
1970 void check_action_diag ()
1971
1972 {
1973
1974 int i;
1975
1976 /*******************************************************************/
1977 /* Check action_result for failure and display diagnostic */
1978 /* messages. */
1979 /*******************************************************************/
1980
1981 if ( action_result == ZFTM_VAL_ACTION_FAILURE )
1982 {
1983 printf ( "Following is a list of %d diagnostic elements -\n"
1984 , diag.zdiagcount );
1985
1986 for ( i = 0; i < diag.zdiagcount; i++ )