OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-50
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1481
1482 case ZAPS_VAL_STATUS_NO_RETRY:
1483 case ZAPS_VAL_STATUS_RETRY_LATER:
1484
1485 /****************************************************************/
1486 /* The nowait I/O completion indicates an error was detected, */
1487 /* and the association should be aborted. If an abort request */
1488 /* is in progress, do not issue another abort request. */
1489 /****************************************************************/
1490
1491 if ( tag != ABORT_TAG )
1492 {
1493 status = FTM_U_ABORT_REQ_ ( cepi
1494 , /* action_result */
1495 , /* diag */
1496 , (long) ABORT_TAG );
1497
1498 /**************************************************************/
1499 /* If the above abort request is sent to the remote system, */
1500 /* calling the main procedure sets the remote_file_update_cmpl*/
1501 /* flag, and the program is terminated. If the request is not */
1502 /* sent out, set the flag here and return to the main procedure.*/
1503 /**************************************************************/
1504
1505 if ( status != ZAPS_VAL_STATUS_OK )
1506 {
1507 remote_file_update_cmplt = TRUE;
1508 }
1509
1510 printf ( "The association has been aborted\n" );
1511 }
1512 break;
1513
1514 case ZAPS_VAL_STATUS_DISCARD:
1515 /***************************************************************/
1516 /* The operation failed because the association was lost. */
1517 /* Indicate that the file update completed with a failure.The */
1518 /* API context information for the association is discarded */
1519 /* in the main processing loop for this application. */