Guardian Programming Reference Summary for pTAL and TAL
SETMODE Operations
Guardian Programming Reference Summary for pTAL and TAL—522631-001
11-23
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 
READX, READUPDATEX, WRITEX, and WRITEUPDATEX are allowed. 
No record locks are supported. READX and WRITEX use the record address 
in NEXTREC. READUPDATEX and WRITEUPDATEX 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. 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 READXs without intervening 
POSITIONs, NEXTREC is incremented by the count actually read. 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 READX call. A POSITION 
before each READX call ensures that the record address meets the page 
boundary constraint.
If -1D positioning is used, the current EOF must be on a page boundary; 
otherwise, the disk process returns an error. If -1D positioning is used or writes 
are done that change the EOF, some performance gains are lost. When the EOF 
is changed, DP2 must do extra checkpoints. To avoid the extra checkpoints, 
issue a CONTROL 2 to set the EOF to a high value before starting a series of 
large writes. When the writes are complete, another CONTROL 2 can be 
issued to set EOF to the correct value.
<function> Parameters and Effect










