Guardian Procedure Calls Reference Manual

size) is 4 KB (4096). Default mode here refers to the mode of the file if SETMODE function
141 is not invoked.
For an unstructured file with an unstructured buffer size other than 4 KB, DP2 automatically
adjusts the unstructured buffer size to 4 KB, if possible, when an I/O larger than 4KB is
attempted. However, this adjustment is not possible for files that have extents with an odd
number of pages; in such cases an I/O over 4 KB is not possible. Note that the switch to a
different unstructured buffer size will have a transient performance impact, so it is recommended
that the size be initially set to 4 KB, which is the default. Transfer sizes over 4 KB are not
supported in default mode for unstructured access to structured files.
Large data transfers using SETMODE function 141
Large data transfers (more than 4096 bytes) can be done for files opened with unstructured
access, regardless of unstructured buffer size, by using SETMODE function 141. When
SETMODE function 141 is used to enable large data transfers, it is permitted to specify up to
56K (57344) bytes for the write-count parameter. For use of SETMODE function 141,
see Table 44 (page 1319) .
File is locked
If a call to FILE_WRITE64_ is made and the file is locked through a file number other than that
supplied in the call, the call is rejected with file-system error 73 (file is locked).
Inserting a new record into a file
FILE_WRITE64_ inserts a new record into a file in the position designated by the file's primary
key:
The record is inserted in the position indicated by the value in its primary-key
field.
Key-Sequenced Files
The record is inserted into a file at a unique location. The disk process sets the
timestamp field in the key, which causes the record to be positioned after the
other existing records that have the same high-order user key.
Queue Files
If the file is audited, the record is available for read operations when the
transaction associated with the write operation commits. If the transaction aborts,
the record is never available to read operations.
If the file is not audited, the record is available as soon as the write operation
finishes successfully.
Unlike other key-sequenced files, a write operation to a queue file will never
encounters an error 10 (duplicate record) because all queue file records have
unique keys generated for them.
After an open or an explicit positioning by its primary key, the record is inserted
in the designated position. Subsequent FILE_WRITE64_ calls without intermediate
Relative Files
positioning insert records in successive record positions. If -2D is specified in
a preceding positioning, the record is inserted in an available record position
in the file.
If -1D is specified in a preceding positioning, the record is inserted following
the last position used in the file. There does not have to be an existing record
in that position at the time of the FILE_WRITE64_ call.
NOTE: If the insert is to be made to a key-sequenced or relative file and the
record already exists, FILE_WRITE64_ fails with an error 10.
The record is inserted following the last record currently existing in the file.Entry-Sequenced Files
The record is inserted at the position indicated by the current value of the
next-record pointer.
Unstructured Files
528 Guardian Procedure Calls (F)