OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-45
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1286 if ( records == MAX_RECORDS && remote_io_cmplt )
1287 {
1288
1289 /*****************************************************************/
1290 /* Issue the data-end primitive. */
1291 /*****************************************************************/
1292
1293 status = FTM_DATA_END_REQ_ ( cepi
1294 , /* action_result */
1295 , /* diag */
1296 , (long) DATAEND_TAG );
1297
1298 check_status ();
1299 return;
1300 }
1301
1302 /*******************************************************************/
1303 /* Once both the local read from the file system and the previous */
1304 /* FTM data request have completed, issue the next data request. */
1305 /*******************************************************************/
1306
1307 if ( remote_io_cmplt && local_read_io_cmplt )
1308 {
1309 /***************************************************************/
1310 /* The following sections initialize the data buffer */
1311 /* that contains the data to be transferred to the remote */
1312 /* system. The buffer contains a data header, a data-element */
1313 /* header, and the data to be transferred. */
1314 /***************************************************************/
1315
1316 /***************************************************************/
1317 /* Initialize a pointer to the data header. Then set the */
1318 /* number of data elements that follow. Only a single data */
1319 /* element is used in this example. */
1320 /***************************************************************/
1321
1322 data_hdr_ptr = (zaps_ddl_data_hdr_def *) remote_buffer;
1323 data_hdr_ptr->znum_elements = 1;
1324