Guardian Procedure Calls Reference Manual

the Transaction Management Facility (TMF), the FILE_AWAITIO64_ or FILE_COMPLETEL_
procedure must be called before the ENDTRANSACTION or ABORTTRANSACTION procedure
is called.
WARNING! When using nowait file I/O, data corruption might occur if the READ or WRITE
buffers are modified before the FILE_AWAITIO64_ or FILE_COMPLETEL_procedure completes
the call. The buffer space must not be freed or reused while the I/O is in progress.
Do not change the contents of the data buffer between the initiation and completion of a
nowait write operation. This is because a retry can copy the data again from the user buffer
and cause the wrong data to be written. Avoid sharing a buffer between a write and another
I/O operation because this creates the possibility of changing the contents of the write buffer
before the write is completed.
Invalid write operations to queue files
Attempts to perform FILE_WRITEUPDATE64_ operations to queue files are rejected with an
error 2.
Buffer considerations
The buffer and count-transferred may be in the user stack or in an extended
data segment. The buffer and count-transferred cannot be in the user code
space.
If the buffer or count-transferred is in a selectable extended data segment, the
segment must be in use at the time of the call. Flat segments allocated by a process are
always accessible to the process.
If the file is opened for nowait I/O, and the buffer is in an extended data segment,
you cannot deallocate or reduce the size of the extended data segment before the I/O
completes with a call to FILE_AWAITIO64_ or FILE_COMPLETEL_ or is canceled by a call
to CANCEL or CANCELREQL.
If the file is opened for nowait I/O, you must not modify the buffer before the I/O
completes with a call to FILE_AWAITIO64_ or FILE_COMPLETEL_. This also applies to
other processes that may be sharing the segment. It is the application's responsibility to
ensure this.
If the file is opened for nowait I/O, the extended segment containing the buffer need
not be in use at the time of the call to FILE_AWAITIO64_ or FILE_COMPLETEL_.
Nowait I/O initiated with these routines may be canceled with a call to CANCEL or
CANCELREQL. The I/O is canceled if the file is closed before the I/O completes or
FILE_AWAITIO64_ or FILE_COMPLETEL_ is called with a positive time limit and specific
file number and the request times out.
If the extended address of the buffer is odd, bounds checking rounds the address to
the next lower word boundary and checks an extra byte as well. The odd address is used
for the transfer.
Performing concurrent large no-wait I/O operations on NSAA systems
In H06.28/J06.17 RVUs with specific SPRs and later RVUs, reads and writes of up to 27,648
bytes can be performed on structured opens of format 2 legacy key-sequenced files and
enhanced key-sequenced files that have increased limits. (For a list of the required
H06.28/J06.17 SPRs, see SPR Requirements for Increased Enscribe Limits for the
H06.28/J06.17 Release (page 31).)
On NSAA systems, the FILE_READ64_, FILE_WRITE64_ and FILE_WRITEREAD64_ procedures
use the process file segment (PFS) of the caller to store the data being read or written. The
FILE_WRITEUPDATE64_ Procedure 539