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

PUT_WRITEX(2) OSS System Calls Reference Manual
Unstructured files
The record is inserted at the position indicated by the current
value of the next-record pointer.
If a record is to be inserted into a key-sequenced or relative file and the record
already exists, the PUT_WRITEX() call fails, and a subsequent call to the
Guardian FILE_GETINFO_ or FILEINFO procedure shows that Guardian file-
system error 10 occurred.
Structured files
Inserting records into relative or entry-sequenced files
If the record is inserted into a relative or entry-sequenced file,
the file must be positioned currently through its primary key.
Otherwise, the PUT_WRITEX() call fails, and a subsequent
call to the Guardian FILE_GETINFO_ or FILEINFO procedure
shows that Guardian file-system error 46 (invalid key)
occurred.
Current-state indicators after an PUT_WRITEX() call
After a successful PUT_WRITEX() call, the current-state indi-
cators for positioning mode and comparison length remain
unchanged.
For key-sequenced files, the current position and the current
primary-key value remain unchanged.
For relative and entry-sequenced files, the current position is that
of the record just inserted and the current primary-key value is
set to the value of the record’s primary key.
Duplicate record found on insertion request
When you attempt to insert a record into a key-sequenced file, if
a duplicate record is found, the PUT_WRITEX() function
returns Guardian file-system error 10 (record already
exists) or error 71 (duplicate record). If the operation is
part of a TMF transaction, the record is locked for the duration
of the transaction.
Unstructured files
DP2 BUFFERSIZE rules
DP2 unstructured files are transparently blocked using one of the
four valid DP2 blocksizes (512, 1024, 2048, or 4096 bytes; 4096
is the default). This transparent blocksize, known as BUFFER-
SIZE, is the transfer size used against an unstructured file.
While BUFFERSIZE does not change the maximum unstruc-
tured transfer (4096 bytes), multiple I/Os can be performed to
satisfy a user request depending on the BUFFERSIZE chosen.
For example, if BUFFERSIZE is 512 bytes, and a request is
made to write 4096 bytes, at least eight transfers, each 512 bytes
long, will be made. More than eight transfers happen, in this
case, if the requested transfer does not start on a BUFFERSIZE
boundary.
DP2 performance with unstructured files is best when requested
transfers begin on BUFFERSIZE boundaries and are integral
multiples of BUFFERSIZE.
5314 Hewlett-Packard Company 527186-023