Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (s and S) SPT_WRITEUPDATEUNLOCKX(2)
Considerations
Buffer use SPT_WRITEUPDATEUNLOCKX() is intended for use with 32-bit extended
addresses. Therefore, the data buffer for SPT_WRITEUPDATEUNLOCKX()
can be either in the caller’s stack segment or any extended data segment.
Nowait I/O and SPT_WRITEUPDATEUNLOCKX()
The SPT_WRITEUPDATEUNLOCKX() function must complete with a
corresponding call to the Guardian AWAITIOX procedure when used with a file
that is opened for nowait I/O.
For files audited by the Transaction Management Facility (TMF), You must call
the AWAITIOX procedure to complete the
SPT_WRITEUPDATEUNLOCKX() operation before
SPT_ENDTRANSACTION() or SPT_ABORTTRANSACTION() is called.
Do not change the contents of the data buffer between the initiation and comple-
tion of a nowait write operation. 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 contents of the write
buffer might change before the write is completed.
Random processing and SPT_WRITEUPDATEUNLOCKX()
For key-sequenced, relative, and entry-sequenced files, random processing
implies that a designated record must exist. Positioning for
SPT_WRITEUPDATEUNLOCKX() 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 SPT_WRITEUPDATEUNLOCKX() is rejected with
Guardian 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 SPT_WRITEUPDATEUNLOCKX() for an unstruc-
tured file typically follows a call to the Guardian POSITION procedure or
SPT_READUPDATEX( ). The current-record and next-record pointers are not
changed by a call to SPT_WRITEUPDATEUNLOCKX().
How SPT_WRITEUPDATEUNLOCKX() works
The record unlocking performed by SPT_WRITEUPDATEUNLOCKX() func-
tions in the same manner as SPT_UNLOCKREC( ).
Record does not exist
Positioning for SPT_WRITEUPDATEUNLOCKX() is always to the record
described by the exact value of the current key and current-key specifier. There-
fore, if such a record does not exist, the call to
SPT_WRITEUPDATEUNLOCKX() is rejected with Guardian file-system
error 11.
Invalid write operations to queue files
DP2 rejects SPT_WRITEUPDATEUNLOCKX() operations with a Guardian
file-system error 2.
Location of buffer and count_written
The buffer and count transferred can be in the user stack or in an extended data
segment. The buffer and count_written cannot be in the user code space.
If the buffer and count_written are in a selectable extended data segment, the
segment must be in use at the time of the call. Flat segments allocated by a pro-
cess are always accessible to the process.
527186-023 Hewlett-Packard Company 7457