Repositioning, Single Buffering
The following information applies if an application chooses single‑buffering and a request is a single statement request. CLI will fetch the response in single buffering mode only; even if double buffering is set and reposition of response is requested.
Application
In the DBCAREA, the application:
DBCHCL
If the specified session is active and the Teradata Database to which the session is connected supports Cursor Repositioning:
An error is returned to the application in the following scenarios:
Otherwise, DBCHCL places a PclROWPOSITION/PclOFFSETPOSITION parcel in the request buffer for the request, supplies the session id and request id of the specified request in the MTDPCB, sets the MTDPCB function code to MTDPCONT, and calls MTDP.
MTDP
MTDP sends a Continue Request message to the Teradata Database. It then returns control to DBCHCL.
DBCHCL
A success or error message is generated in the message field of the DBCAREA and DBCHCL returns to the application.
Application
If the return code or the error flag in the DBCAREA is not normal, the application makes the appropriate changes, and re‑submits the DBCAREA to DBCHCL, as above. Otherwise, it performs a fetch as for the non‑reposition case and consumes the unit of response. Typically, the application loops back for another unit of response until the EndRequest parcel is obtained.