Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (W-Z)
Guardian Procedure Calls Reference Manual—522629-013
16-30
WRITEUPDATE[X] Procedures
You should 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. You should
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 WRITEUPDATE[X] operations are rejected with an error 2.
Disk File Considerations
•
Large data transfers
For WRITEUPDATEX only, large data transfers (more than 4096 bytes), can be
enabled by using SETMODE function 141. Refer to Table 14-4
.
•
Random processing and WRITEUPDATE[X]
For key-sequenced, relative, and entry-sequenced files, random processing
implies that a designated record must exist. This means that positioning for
WRITEUPDATE[X] is always to the record described by the exact value of the
current key and current-key specifier. If such a record does not exist, the call to
WRITEUPDATE[X] is rejected with file-system error 11 (record does not exist).
•
File is locked
If a call to WRITEUPDATE[X] is made and the file is locked through a file number
other than that supplied in the call, the call is rejected with file-system error 73 (file
is locked).
•
When the just-read record is updated
A call to WRITEUPDATE[X] following a call to READ[X], without intermediate
positioning, updates the record just read.
•
Unstructured files
•
Unstructured disk file: transferring data
If the WRITEUPDATE[X] is to an unstructured disk file, data is transferred to
the record location specified by the current-record pointer.
•
File pointers after a successful WRITEUPDATE[X]
After a successful WRITEUPDATE[X] to an unstructured file, the current-record
and next-record pointers are unchanged.
•
The number of bytes written
If the unstructured file is created with the odd unstructured attribute (also
known as ODDUNSTR) set, the number of bytes written is exactly the number
specified in
write-count. If the odd unstructured attribute is not set when