OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-93
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
1441 !--------------------------------------------------------------!
1442
1443 @element_hdr_ptr := @data_hdr_ptr + $udbl ($len (data_hdr_ptr));
1444 element_hdr_ptr.zlen := $dbl ( buf_count_transferred );
1445 element_hdr_ptr.ztype := ZFTM^VAL^DE^TEXT;
1446
1447 !--------------------------------------------------------------!
1448 ! Initialize a pointer to the data portion of the buffer !
1449 ! that follows the data header and data-element header. Copy !
1450 ! the data from the local read buffer into the data buffer. !
1451 !--------------------------------------------------------------!
1452
1453 @data_ptr := @element_hdr_ptr + $udbl ($len (element_hdr_ptr));
1454 data_ptr ':=' local_buffer FOR buf_count_transferred BYTES;
1455
1456 !--------------------------------------------------------------!
1457 ! Issue the data-request primitive. !
1458 !--------------------------------------------------------------!
1459
1460 status := FTM_DATA_REQ_ ( cepi
1461 , remote_buffer
1462 , $dbl (DATA_TAG) );
1463
1464 CALL check_status;
1465
1466 !--------------------------------------------------------------!
1467 ! Indicate that an FTM data request is in progress. !
1468 !--------------------------------------------------------------!
1469
1470 remote_io_cmplt := FALSE;
1471
1472 !--------------------------------------------------------------!
1473 ! Update the number of records that have been read. If !
1474 ! the maximum number of records has been read, then return to !
1475 ! the main control loop and wait for an I/O operation or an !
1476 ! FTAM event to complete; otherwise, read another record !
1477 ! from the local Guardian file. !
1478 !---------------------------------------------------------------!
1479