OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-158
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
2026 /*******************************************************************/
2027 /* Initialize the parameters for the U-abort request. */
2028 /*******************************************************************/
2029
2030
2031 /*******************************************************************/
2032 /* Send a failed action result since the following diagnostic */
2033 /* message type is set to "permanent." */
2034 /*******************************************************************/
2035
2036 action_result = ZFTM_VAL_ACTION_FAILURE;
2037
2038
2039 /*******************************************************************/
2040 /* The following code demonstrates how to set the diagnostic para -*/
2041 /* meter for an FTM_U_ABORT_REQ_ call. The diagnostic values set */
2042 /* here are for example only; a real application might be more */
2043 /* specific, for instance, in the error code. Here, type is set */
2044 /* to "permanent"; error code is set to "no reason"; observer */
2045 /* of the error is this application; and the source of the error */
2046 /* is not categorized. */
2047 /*******************************************************************/
2048
2049 diag.zdiagcount = 1;
2050 diag.zdiagelemsispresent = ZAPS_VAL_TRUE;
2051 diag.zdiagelems[0].zdiagtype = ZFTM_VAL_DIAG_PERMANENT;
2052 diag.zdiagelems[0].zerrorid = ZFTM_DIAG_NO_REASON;
2053 diag.zdiagelems[0].zerrorobserver = ZFTM_VAL_ENTITYREF_INITFSRVUSR;
2054 diag.zdiagelems[0].zerrorsource = ZFTM_VAL_ENTITYREF_NOCATPOSS;
2055 diag.zdiagelems[0].zsuggesteddelayispresent = ZAPS_VAL_FALSE;
2056 diag.zdiagelems[0].zfurtherdetailsispresent = ZAPS_VAL_FALSE;
2057
2058 /*******************************************************************/
2059 /* Abort the source association if it exists. */
2060 /*******************************************************************/
2061
2062 if ( src_con_established )
2063 {
2064 status = FTM_U_ABORT_REQ_ ( src_cepi