No Rewinding, Double Buffering - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-01
dita:mapPath
ggf1488824663364.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2418
lifecycle
previous
Product Category
Teradata Tools and Utilities

The following information applies if the application has chosen double buffering when initiating the request, and is now choosing to see the response without rewinding.

Application

In the DBCAREA, the application performs the following tasks:
  • Supplies the session id and request id of the response required sets the function code to DBFFET
  • Supplies the length of and a pointer to a response area, if the request was submitted with the Move Mode processing option
  • Calls DBCHCL

DBCHCL

DBCHCL first determines whether to use the DBCAREA or the RCB for the specified request when testing options by testing the set options flag of the DBCAREA. If it is Y, the DBCAREA options are used; otherwise, the RCB options are used. If the current response buffer has been consumed and the EndRequest parcel has not been received, MTDP is called with the request and session identifiers, the MTDPRET function, and the waitdata options set according to the waitdata options flag value of the selected options area.

MTDP

MTDP checks if the specified request has completed, and, if it has not completed and the waitdata option is set, waits until the response message for the prior request arrives or an error occurs, then returns control to DBCHCL.

DBCHCL

If MTDP fails either because of a fault or because the wait data option was not set, DBCHCL returns an error message to the application. Otherwise, the active response buffer becomes the current buffer, and, if the current buffer does not contain an EndRequest parcel, the previously current buffer becomes the active buffer and MTDP is called with the session and request identifier fields of the MTDPCB set as before and the function field set to MTDPCONT.

MTDP

MTDP sends a Continue Request message to the Teradata Database and returns to DBCHCL.

DBCHCL

If MTDP returns unsuccessfully, an error message is returned to the application. DBCHCL makes the next unit of response available to the application program using the method chosen by the application when the request was initiated, and returns control to the application program.

Application

If the return code in the DBCAREA is not normal, the application makes the appropriate changes, and re-submits the MTDP Control Block to DBCHCL, as above. Otherwise, it consumes the unit of response. Typically, the application loops back for another unit of response until the EndRequest parcel is obtained.