Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
SPT_WRITEX(2) OSS System Calls Reference Manual
record) because all queue file records have unique keys gen-
erated for them.
Relative files After an open or an explicit positioning by its primary key, the
record is inserted in the designated position.
Subsequent SPT_WRITEX() calls without intermediate posi-
tioning insert records in successive record positions. If -2 is
specified in a preceding positioning, the record is inserted in an
available record position in the file.
If -1 is specified in a preceding positioning, the record is inserted
following the last position used in the file. An existing record
does not have to be in that position at the time of the
SPT_WRITEX() call.
Entry-sequenced files
The record is inserted following the last record currently exist-
ing in the file.
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 SPT_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 SPT_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 SPT_WRITEX() call
After a successful SPT_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 SPT_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.
7−480 Hewlett-Packard Company 527186-023