OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-23
Example 1 in C—Updating a Remote File (in Nowait
Mode)
427 {
428 check_status ();
429 exit (EXIT_SUCCESS);
430 }
431
432 /**********************************************************************/
433 /* The main control loop continues processing until an abort or */
434 /* discard condition occurs, or until the last data request is sent. */
435 /**********************************************************************/
436
437 while ( ! remote_file_update_cmplt )
438 {
439
440 /*******************************************************************/
441 /* Assign a filenum value of -1 to make the process wait for the */
442 /* first I/O completion of an FTM, APS, or Guardian file-system */
443 /* procedure. */
444 /*******************************************************************/
445
446 filenum = -1;
447
448 /*******************************************************************/
449 /* Wait for the next I/O completion from an FTM, APS, or */
450 /* Guardian file-system procedure. */
451 /*******************************************************************/
452
453 condition_code = MFM_AWAITIOX_ ( &status /* Output */
454 , &filenum /* I/O */
455 , &buffer_addr /* Output */
456 , &count_transferred /* Output */
457 , &tag /* Output */
458 , (long) WAIT_FOREVER /* Input */
459 , /* segment_id */ );
460
461 /*******************************************************************/
462 /* If an I/O completion for READX is received, save the value of */
463 /* count_transferred in buf_count_transferred for later use. */
464 /*******************************************************************/
465