Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual—522629-013
14-93
SETMODE Procedure
141,
continued
If the file is audited and structured, the file must be opened with an access
mode of read-only. The exclusion mode can be shared, protected, or
exclusive. If the exclusion mode is shared, updates done by other openers
of the file might not be seen by this opener.
If the file is audited and unstructured, only read operations can be performed
on the file after this SETMODE is issued with
param1 set to 1. Write
operations must not be issued until the SETMODE is reissued with
param1
set to 0.
If the file is not audited, the file can be opened with any access mode and
any exclusion mode. If the exclusion mode is shared, updates done by other
openers of the file might not be seen by this opener. To issue write requests
after the SETMODE is issued with
param1 set to 1, the exclusion mode must
be exclusive.
Once the large transfer mode is enabled, only the data transfer operations of
READ[X], READUPDATE[X], WRITE[X], and WRITEUPDATE[X] are
allowed. No record locks are supported. READ[X] and WRITE[X] use the
record address in NEXTREC. READUPDATE[X] and WRITEUPDATE[X]
use the record address in CURREC. POSITION can be used to set
CURREC and NEXTREC. Relative byte addressing is used for positioning.
The operation is done nowait if the file is opened for nowait I/O. The
operation must then be completed by a call to AWAITIOX. The operation
can be canceled by CANCEL or CANCELREQ.
With the large transfer mode enabled, data is read or written directly from the
user's buffer. The user's buffer is locked in memory until completion of the
operation. The data is not moved to or from the PFS (regardless of the
setting of SETMODE 72). If the I/O is done nowait, the user should not
modify or examine the data in the buffer until the I/O has finished. This also
applies to other processes sharing the segment containing the buffer. If the
I/O is done in a nowait manner and the buffer is in the stack, the buffer must
be in the high end of the stack.
The record address (in NEXTREC or CURREC) must be on a page
boundary (a multiple of 2K bytes) or error 550, "illegal position," will be
returned. Note that, as usual, when performing successive READ[X]s without
intervening POSITIONs, NEXTREC is incremented by the count actually
read, and that just before the EOF, the count read will probably not be a
multiple of 2K bytes, hence violating the record address constraint for the
next READ[X] call. A POSITION before each READX call ensures that the
record address meets the page boundary constraint.
Table 14-4. SETMODE Functions (page 26 of 34)
function Parameters and Effect