Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (W-Z)
Guardian Procedure Calls Reference Manual—522629-013
16-29
WRITEUPDATE[X] Procedures
Considerations
•
WRITEUPDATE versus WRITEUPDATEX
Use WRITEUPDATE when the buffer has a 16-bit address, and use
WRITEUPDATEX when the buffer has a 32-bit extended address. Therefore, the
data buffer for WRITEUPDATEX can be either in the caller’s stack segment or any
extended data segment.
•
I/O counts with unstructured files
Unstructured files are transparently blocked using one of the four valid blocksizes
(512, 1024, 2048, or 4096 bytes; 4096 is the default). This transparent blocksize,
known as BUFFERSIZE, is the transfer size used against an unstructured file.
While BUFFERSIZE does not change the maximum unstructured transfer (4096
bytes), multiple I/O operations might be performed to satisfy a user’s request
depending on the BUFFERSIZE chosen. For example, if BUFFERSIZE is 512
bytes, and a request is made to write 4096 bytes, at least eight transfers, each 512
bytes long, will be made. More than eight transfers happen, in this case, if the
requested transfer does not start on a BUFFERSIZE boundary.
DP2 performance with unstructured files is best when requested transfers begin on
BUFFERSIZE boundaries and are integral multiples of BUFFERSIZE.
Because the maximum blocksize for DP2 structured files is also 4096 bytes, this is
also the maximum structured transfer size for DP2.
•
Deleting locked records
Deleting a locked record implicitly unlocks that record unless the file is audited, in
which case the lock is not removed until the transaction terminates.
•
Waited WRITEUPDATE[X]
If a waited WRITEUPDATE[X] is executed, the
count-written parameter
indicates the number of bytes actually written.
•
Nowait WRITEUPDATE[X]
If a nowait WRITEUPDATE[X] is executed,
count-written has no meaning and
can be omitted. The count of the number of bytes written is obtained through the
count-transferred parameter of the AWAITIO[X] procedure when the I/O
completes.
The WRITEUPDATE[X] procedure must finish with a corresponding call to the
AWAITIO[X] procedure when used with a file that is opened nowait. For files
audited by the Transaction Management Facility (TMF), the AWAITIO[X] procedure
must be called before the ENDTRANSACTION or ABORTTRANSACTION
procedure is called.