Guardian Procedure Calls Reference Manual

For key-sequenced and relative files: 0 means delete the record.
For entry-sequenced files: 0 means anything <> the record's length is invalid.
count-written
output
(for WRITEUPDATE)INT:ref:1
(for WRITEUPDATEX)INT .EXT:ref:1
is for wait I/O only. It returns a count of the number of bytes written to the file.
tag
input
INT(32):value
is for nowait I/O only. tag is a value you define that uniquely identifies the operation associated
with this WRITEUPDATE[X].
The system stores this tag value until the I/O operation completes. The system returns the tag
information back to the program in the tag parameter of the call to AWAITIO[X], thus indicating
that the operation completed. If WRITEUPDATEX is used, you must call AWAITIOX to complete
the I/O. If WRITEUPDATE is used, you can use either AWAITIO or AWAITIOX to complete the
I/O.
Condition Code Settings
indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).< (CCL)
< (CCL) is returned following successful insertion or update of a record in a file with one or more
insertion-ordered alternate keys if a duplicate key value was created for at least one insertion-ordered
alternate key. A call to FILE_GETINFO_ or FILEINFO shows that error 551 occurred; this error is
advisory only and does not indicate an unsuccessful write operation.
indicates the WRITEUPDATE[X] was successful.= (CCE)
indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).> (CCG)
Considerations
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.
WRITEUPDATE[X] Procedures 1511