Guardian Procedure Calls Reference Manual

Default locking mode action
If the default locking mode is in effect when a call to READUPDATE[X|XL] 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 READUPDATE[X|XL] is suspended and queued in the "locking" queue behind other
processes attempting to access the file or record.
NOTE: A deadlock condition occurs if a call to READUPDATE[X|XL] is made by a process
having multiple opens on the same file and the filenum used to lock the file differs from the
filenum supplied to READUPDATE[X|XL].
Alternate locking mode action
If the alternate locking mode is in effect when READUPDATE[X|XL] is called and the file is
locked but not through the file number supplied in the call, the call is rejected with error 73
(file is locked).
Lock mode by SETMODE
The locking mode is specified by the SETMODE procedure, function 4.
Value of the current key and current-key specifier
For key-sequenced, relative, and entry-sequenced files, random processing implies that a
designated record must exist. Therefore, positioning for READUPDATE[X|XL] is always to the
record described by the exact value of the current key and current-key specifier. If such a
record does not exist, the call to READUPDATE[X|XL] is rejected with a file-system error 11
(record does not exist). This is unlike sequential processing through READ[X] where positioning
can be by approximate, generic, or exact key value.
Performing concurrent large no-wait I/O operations on NSAA systems
In H06.28/J06.17 RVUs with specific SPRs and later RVUs, reads and writes of up to 27,648
bytes can be performed on structured opens of format 2 legacy key-sequenced files and
enhanced key-sequenced files that have increased limits. (For a list of the required
H06.28/J06.17 SPRs, see SPR Requirements for Increased Enscribe Limits for the
H06.28/J06.17 Release (page 31).)
On NSAA systems, data being read or written may be stored in the 32MB process file segment
(PFS) along with the open file information. This segment provides an upper limit on the number
of concurrent no-wait I/O operations with large read-count or write-count values for those
applications with a large number of open files. You can work around this limitation by following
these guidelines in your application:
1. Define read and write buffers with sizes that are multiples of 16 KB.
2. Call the USERIOBUFFER_ALLOW_ procedure before issuing any large no-wait I/Os.
3. Allocate the extended data segments using the SEGMENT_ALLOCATE_ procedure. More
than one segment might be required, depending on the maximum number of concurrent
large no-wait I/Os and the total size of the memory required by the application.
4. Define memory pools for the allocated extended data segments.
5. Use the POOL_GETSPACE_PAGE_ procedure to obtain a block of memory, which will
be used as the read or write buffer.
6. When the no-wait I/O operation is complete, use the POOL_PUTSPACE_ procedure to
return the memory to the pools.
On non-NSAA systems, reads and writes larger than 4KB on key-sequenced files may be
performed directly from or into the application’s buffer.
READUPDATE[X|XL] Procedures 1217