Some operations retain positioning while others release it. In
a similar way, some operations hold onto a buffer and others release
it with its contents. Table 1 shows which
RPL options result in the retention of data buffers and positioning,
and which options result in the release of data buffers and positioning.
Table 1. Effect
of RPL options on data buffers and positioningRPL Options |
Retained |
Released |
---|
SEQ |
* |
|
SKP |
* |
|
DIR NSP |
* |
|
DIR (no NSP) |
|
* |
DIR LOC |
* |
|
UPD (with GET) |
* |
|
any (with POINT) |
* |
|
Note: - A sequential GET request which was positioned on the last record
of a buffer will release that buffer and position to the next buffer
(control interval) to return the next sequential record.
- The
ENDREQ macro releases data buffers and, if any, shared resources or
RLS, index buffer, and positioning.
- Certain options that retain positioning and buffers on normal
completion cannot do so if the request fails with an error code. See z/OS DFSMS Macro Instructions for Data Sets to
determine if positioning is maintained if a logical error occurs.
- Use the ENDREQ macro to end requests that hold position before
reusing the RPL, to avoid unpredictable results. The RPL that you
ENDREQ must be the same RPL that was used to issue the initial request.
- The
POINT request, regardless of the RPL options, will always hold position
because it only positions and does not return a record. A sequential
GET following the POINT will retrieve the record; a direct GET establishes
its own position and may or may not retrieve the record to which POINT
was positioned. The request following a POINT will either keep position
or release it based on Table 1.
The following operation uses but immediately releases a buffer
and does not retain positioning:
GET RPL OPTCD=(DIR,NUP,MVE)