Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (n - p) PUT_READLOCKX(2)
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Link the application to the zputdll library.
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit applications.
To use this function in a 32-bit application on systems running H06.24 or later RVUs or J06.13 or
later RVUs, perform the same tasks (described above) used to enable the function on systems
running H06.21/J06.10 or later RVUs.
To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or
later RVUs, you must perform all of the following tasks:
Include the pthread.h header file in the application.
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Compile the application using the -Wlp64 compiler command option.
Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
Considerations
Buffer use PUT_READLOCKX() is intended for use with 32-bit extended addresses and
64-bit extended addresses. The data buffer for PUT_READLOCKX() can be
either in the caller’s stack segment or any extended data segment.
Nowait I/O and PUT_READLOCKX()
If the PUT_READLOCKX() function is used to initiate an operation with a file
opened for nowait I/O, it must complete with a corresponding call to the Guar-
dian AWAITIOX procedure.
Use for key-sequenced, relative, and entry-sequenced files
For key-sequenced, relative, and entry-sequenced files, a subset of the file
(defined by the current access path, positioning mode, and comparison length) is
locked and read with successive calls to PUT_READLOCKX().
For key-sequenced, relative, and entry-sequenced files, the first call to
PUT_READLOCKX() after a positioning (or open) locks and then returns the
first record of the subset. Subsequent calls to PUT_READLOCKX() without
intermediate positioning locks returns successive records in the subset. After
each of the subset’s records are read, the position of the record just read becomes
the files current position. An attempt to read a record following the last record
in a subset returns an EOF indication.
Locking records in an unstructured file
You can use PUT_READLOCKX() to lock record positions, represented by a
relative byte address (RBA), in an unstructured file. When sequentially reading
an unstructured file with PUT_READLOCKX(), each call to
PUT_READLOCK[X() first locks the RBA stored in the current next-record
pointer and then returns record data beginning at that pointer for read_count
bytes. After a successful call to PUT_READLOCK[X(), the current-record
pointer is set to the previous next-record pointer, and the next-record pointer is
set to the previous next-record pointer plus read_count. This process repeats for
each subsequent call to PUT_READLOCKX().
527186-023 Hewlett-Packard Company 5233