Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (s and S) SPT_READUPDATEX(2)
For programming information about the READUPDATEX procedure, see the Enscribe
Programmer’s Guide and the Guardian Programmer’s Guide.
Considerations
Buffer use SPT_READUPDATEX() is intended for use with 32-bit extended addresses.
Therefore, the data buffer for SPT_READUPDATEX() can be either in the
caller’s stack segment or any extended data segment.
Random processing and positioning
A call to SPT_READUPDATEX() returns the record from the current position
in the file. Because SPT_READUPDATEX() is designed for random process-
ing, it cannot be used for successive positioning through a subset of records as
the SPT_READX() function does. Rather, SPT_READUPDATEX() reads a
record after a call to the Guardian POSITION or KEYPOSITION procedure, in
anticipation of a subsequent update through a call to the Guardian WRITEUP-
DATEX procedure.
Calling SPT_READUPDATEX() after SPT_READX( )
A call to SPT_READUPDATEX() after a call to SPT_READX(), without
intermediate positioning, returns the same record as the call to SPT_READX( ).
Waited SPT_READUPDATEX()
If a waited SPT_READUPDATEX() call is executed, the count_read parameter
indicates the number of bytes actually read.
Nowait I/O and SPT_READUPDATEX()
If a nowait SPT_READUPDATEX( ) call is executed, count_read has no mean-
ing and can be omitted. The count of the number of bytes read is obtained when
the I/O operation completes through the count_transferred parameter of the
Guardian AWAITIOX procedure. The SPT_READUPDATEX( ) function must
complete with a corresponding call to the Guardian AWAITIOX procedure when
used with a file that is opened for nowait I/O.
Default locking mode action
If the default locking mode is in effect when a call to SPT_READUPDATEX( )
is made to a locked file or record, but the filenum of the locked file differs from
the filenum in the call, the caller of SPT_READUPDATEX( ) is suspended and
queued in the locking queue behind other processes attempting to access the file
or record.
Use on OSS objects
This procedure operates only on Guardian objects. If an OSS file is specified, Guardian file-
system error 2 occurs.
RETURN VALUES
The SPT_READUPDATEX() function returns 0 (zero) upon successful completion. Otherwise,
this function returns a nonzero Guardian file-system error number that indicates the outcome of
the operation.
For information about Guardian file-system error numbers, see the Guardian Procedure Errors
and Messages Manual.
527186-023 Hewlett-Packard Company 7−335