Guardian Procedure Calls Reference Manual

or READUPDATE[X]. The current-record and next-record pointers are not changed by a call to
WRITEUPDATEUNLOCK[X].
How WRITEUPDATEUNLOCK[X] works
The record unlocking performed by WRITEUPDATEUNLOCK[X] functions in the same manner
as UNLOCKREC.
Record does not exist
Positioning for WRITEUPDATEUNLOCK[X] is always to the record described by the exact
value of the current key and current-key specifier. Therefore, if such a record does not exist,
the call to WRITEUPDATEUNLOCK[X] is rejected with file-system error 11.
See the WRITEUPDATE[X] procedure Considerations (page 1511).
Invalid write operations to queue files
DP2 rejects WRITEUPDATEUNLOCK[X] operations with an error 2.
Performing concurrent large no-wait I/O operations on NSAA systems
In 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.
OSS Considerations
This procedure operates only on Guardian objects. If an OSS file is specified, error 2 is returned.
Considerations for WRITEUPDATEUNLOCKX Only
The buffer and count transferred may be in the user stack or in an extended data segment.
The buffer and count transferred cannot be in the user code space.
If the buffer or count transferred is in a selectable extended data segment, the segment must
be in use at the time of the call. Flat segments allocated by a process are always accessible
to the process.
If the file is opened for nowait I/O, and the buffer is in an extended data segment, you cannot
deallocate or reduce the size of the extended data segment before the I/O completes with a
call to AWAITIOX or is canceled by a call to CANCEL or CANCELREQ.
WRITEUPDATEUNLOCK[X] Procedures 1519