Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual
Random processing and SPT_WRITEUPDATEX()
For key-sequenced, relative, and entry-sequenced files, random processing
implies that a designated record must exist. Positioning for
SPT_WRITEUPDATEX() 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_WRITEUPDATEX() is rejected with Guardian file-system error 11
(record does not exist).
File is locked
If a call to SPT_WRITEUPDATEX() is made and the file is locked through a
file number other than that supplied in the call, the call is rejected with Guardian
file-system error 73 (file is locked).
When the just-read record is updated
A call to SPT_WRITEUPDATEX() following a call to SPT_READX( ),
without intermediate positioning, updates the record just read.
Unstructured files
Transferring disk file data
If the SPT_WRITEUPDATEX() call is to an unstructured disk
file, data is transferred to the record location specified by the
current-record pointer.
File pointers after a successful call
After a successful SPT_WRITEUPDATEX() call to an
unstructured file, the current-record and next-record pointers are
unchanged.
Number of bytes written
If the unstructured file is created with the odd unstructured attri-
bute (also known as ODDUNSTR) set, the number of bytes writ-
ten is exactly the number specified in write_count. If the odd
unstructured attribute is not set when the file is created, the
value of write_count is rounded up to an even value before the
SPT_WRITEUPDATEX() call is executed.
You set the odd unstructured attribute with the Guardian
FILE_CREATE_, FILE_CREATELIST_, or CREATE pro-
cedure, or with the File Utility Program (FUP) SET and
CREATE commands.
Structured files
Calling SPT_WRITEUPDATEX() after KEYPOSITION
If the call to SPT_WRITEUPDATEX() immediately follows a
call to the Guardian KEYPOSITION procedure in which a
nonunique alternate key is specified as the access path, the
SPT_WRITEUPDATEX() call fails. A subsequent call to the
Guardian FILE_GETINFO_ or FILEINFO procedure shows that
Guardian file-system error 46 (invalid key) occurred. How-
ever, if an intermediate call to SPT_READX() or
SPT_READLOCKX() is performed, the call to
SPT_WRITEUPDATEX() is permitted because a unique
record is identified.
7−462 Hewlett-Packard Company 527186-023