The following information applies if an application chooses to fetch LOB data in deferred mode, using locators and choosing to reposition the response.
If double buffering is set and LOB data is fetched in deferred mode, CLI will fetch the response in single buffering mode when initiating the request, and will fetch LOB data in deferred mode.
- Supplies the session id and request id of the response required.
- Supplies the length of and a pointer to the response area, if the request was submitted with the Move Mode processing option.
- At the time of initiating the request, application has to set the DBCAREA fields resp_mode to 'M' and return_object to 'S' or 'T', depending on whether Static (spool locators) or transaction locators are to be returned.
- Sets the function code to FETCH(DBFFET).
- Calls DBCHCL.
If the specified request is active, DBCHCL performs the following tasks:
- Supplies the session id and request id of the active request in the MTDPCB.
- Sets the waitdata option flag, according to the input options waitdata value.
- Checks if keep_resp is set to 'Y'. If not, an error message is returned to the application.
- Sets the function code to MTDPRET.
- Calls MTDP.
MTDP checks if the request has completed, and, if waitdata is TRUE, waits until the response message for the prior request arrives or an error occurs, and then returns control to DBCHCL.
A success or error message is generated in the message field of DBCAREA and DBCHCL returns to the application.
If an application is ready to receive binary large object (BLOB) data at this point:
- It issues the SQL SELECT request, using the BLOB locator returned in a previous response (for example, USING (A BLOB AS LOCATOR) SELECT :A;).
This select must be issued on the same session by the application.
- CLI and the application handle the fetch request for this select the same way as in a normal No Rewinding, Single Buffering fetch. See No Rewinding, Single Buffering.