Guardian Procedure Calls Reference Manual
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 WRITEUPDATEUNLOCK[X].
NOTE: The system stores this tag value until the I/O operation completes. The system then
returns the tag information to the program in the tag parameter of the call to AWAITIO[X],
thus indicating that the operation completed. If WRITEUPDATEUNLOCKX is used, you must
call AWAITIOX to complete the I/O. If WRITEUPDATEUNLOCK 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)
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
< (CCL)
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 that the WRITEUPDATEUNLOCK[X] was successful.= (CCE)
indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).> (CCG)
Considerations
• Nowait I/O and WRITEUPDATEUNLOCK[X]
The WRITEUPDATEUNLOCK[X] procedure must complete with a corresponding call to the
AWAITIO[X] procedure when used with a file that is opened nowait. If
WRITEUPDATEUNLOCKX is used, you must call AWAITIOX to complete the I/O. If
WRITEUPDATEUNLOCK is used, you can use either AWAITIO or AWAITIOX to complete the
I/O.
For files audited by the Transaction Management Facility (TMF), AWAITIO[X] must be called
to complete the WRITEUPDATEUNLOCK[X] operation before ENDTRANSACTION or
ABORTTRANSACTION is called.
WARNING! When using nowait file I/O, data corruption might occur if the READ or WRITE
buffers are modified before the AWAITIOX that 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.
• Random processing and WRITEUPDATEUNLOCK[X]
For key-sequenced, relative, and entry-sequenced files, random processing implies that a
designated record must exist. This means positioning for WRITEUPDATEUNLOCK[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 WRITEUPDATEUNLOCK[X] is rejected with file-system error
11 (record does not exist).
• Unstructured files—pointers unchanged
For unstructured files, data is written in the position indicated by the current-record pointer. A
call to WRITEUPDATEUNLOCK[X] for an unstructured file typically follows a call to POSITION
1518 Guardian Procedure Calls (W-Z)