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

PUT_WRITEUPDATEX(2) OSS System Calls Reference Manual
Unstructured files
Transferring disk file data
If the PUT_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 PUT_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
PUT_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 PUT_WRITEUPDATEX() after KEYPOSITION
If the call to PUT_WRITEUPDATEX() immediately follows a
call to the Guardian KEYPOSITION procedure in which a
nonunique alternate key is specified as the access path, the
PUT_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 PUT_READX() or
PUT_READLOCKX() is performed, the call to
PUT_WRITEUPDATEX() is permitted because a unique
record is identified.
Specifying write_count for entry-sequenced files
For entry-sequenced files, the value of write_count must match
exactly the write_count value specified when the record was ori-
ginally inserted into the file.
Changing the primary-key of a key-sequenced record
An update to a record in a key-sequenced file cannot alter the
value of the primary-key field. To change the primary-key field,
you must delete the old record (PUT_WRITEUPDATEX()
with write_count = 0 [zero]) and insert a new record with the
key field changed (PUT_WRITEX()).
Current-state indicators after PUT_WRITEUPDATEX()
After a successful PUT_WRITEUPDATEX() call, the
current-state indicators remain unchanged.
5308 Hewlett-Packard Company 527186-023