Repositioning, Single/Double Buffered LOB Data - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Workstation-Attached Systems

Product
Call-Level Interface Version 2
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2418
lifecycle
previous
Product Category
Teradata Tools and Utilities

Repositioning, Single/Double Buffered LOB Data

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.

Application

  • 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.
  • DBCHCL

    If the specified request is active, DBCHCL:

  • 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

    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.

    DBCHCL

    A success or error message is generated in the message field of DBCAREA and DBCHCL returns to the application.

    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;).
  • Note: 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” on page 43.