Guardian Procedure Calls Reference Manual

Returned Value
INT
A file-system error code that indicates the outcome of the call.
22
The address of a parameter is extended, but no segment is in use at the time of the call or the segment in
use is invalid.
The address of a parameter is extended, but it is an absolute address and the caller is not privileged.
The file system cannot use the user's segment when needed.
Considerations
EpTAL callers must set toggle
EpTAL callers must set the toggle _64BIT_CALLS before sourcing the
FILE_WRITEUPDATEUNLOCK64_ procedure section from EXTDECS.
Familar semantics
Unless otherwise described, the semantic behavior of FILE_WRITEUPDATEUNLOCK64_ is the
same as that of WRITEUPDATEUNLOCKX.
Nowait I/O and FILE_WRITEUPDATEUNLOCK64_
If FILE_WRITEUPDATEUNLOCK64_ is called on a file opened for nowait I/O, then the operation
must be completed by calling either FILE_AWAITIO64_ or FILE_COMPLETEL_.
For files audited by the Transaction Management Facility (TMF), FILE_AWAITIO64_ or
FILE_COMPLETEL_ must be called to complete the FILE_WRITEUPDATEUNLOCK64_ 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 FILE_AWAITIO64_ or FILE_COMPLETEL_ 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 FILE_WRITEUPDATEUNLOCK64_
For key-sequenced, relative, and entry-sequenced files, random processing implies that a
designated record must exist. This means positioning for FILE_WRITEUPDATEUNLOCK64_ 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 FILE_WRITEUPDATEUNLOCK64_ 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 FILE_WRITEUPDATEUNLOCK64_ for an unstructured file typically follows a call to
FILE_SETPOSITION_ (or POSITION) or FILE_READUPDATE64_. The current-record and
next-record pointers are not changed by a call to FILE_WRITEUPDATEUNLOCK64_ .
How FILE_WRITEUPDATEUNLOCK64_ works
The record unlocking performed by FILE_WRITEUPDATEUNLOCK64_ functions in the same
manner as FILE_UNLOCKREC64_.
FILE_WRITEUPDATEUNLOCK64_ Procedure 545