OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-142
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1402 error = FTM_DESELECT_CNF_ ( dst_cepi
1403 , (long *) &action_result
1404 , (int *) &dst_charging
1405 , (int *) &diag );
1406 check_error ();
1407 check_action_diag ();
1408
1409 event = ZFTM_VAL_EVT_ENDGROUP_CNF;
1410 get_event ( &event, dst_cepi );
1411
1412
1413 /*******************************************************************/
1414 /* Terminate the source-file file-open and file-selection regimes. */
1415 /*******************************************************************/
1416
1417
1418 /*******************************************************************/
1419 /* Issue a close and delete request for the source file. The */
1420 /* delete is used since this example is moving the file, not */
1421 /* simply copying it. */
1422 /*******************************************************************/
1423
1424 /*******************************************************************/
1425 /* Initialize the threshold for the begin-group request to */
1426 /* indicate that both services (close and delete) must be */
1427 /* successful for the group to succeed. */
1428 /*******************************************************************/
1429
1430 threshold = 2;
1431 status = FTM_BEGIN_GROUP_REQ_ ( src_cepi
1432 , threshold );
1433 check_status ( src_cepi );
1434
1435 status = FTM_CLOSE_REQ_ ( src_cepi );
1436 check_status ( src_cepi );
1437
1438 status = FTM_DELETE_REQ_ ( src_cepi );
1439 check_status ( src_cepi );
1440