16.20 - Changing the Value for Two-response-buffers - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Teradata Tools and Utilities
September 2019
Programming Reference
When the value for Two-response-buffers is not appropriate for the application, you should perform the following procedure before calling DBCHCL for any of the following functions:
  • Connect
  • RunStartUp
  • Initiate with Protocol-function
  • Initiate Request
  1. Set Change-options to 'Y'.
  2. Change the value for Two-response-buffers as follows.
    If the response is to be... Then change the value for Two-response-buffers to...
    double-buffered Y
    single-buffered N

Use mnemonics for the codes. Mnemonics are provided in the language definition file for the DBCAREA.

Double buffering is useful when large responses are expected from Teradata Database and large response buffers are used.

Substantial improvements in response time can result by transferring the next buffer full of response data from Teradata Database while the previous buffer full is being accessed by the application.

DBCHCL automatically restocks the response buffers.

The application may have to wait for data to arrive if the application is consuming the data faster than Teradata Database can restock the buffer, but it does not have to arrange for data to arrive.

The response for the connect request is not double-buffered, even if Two-response-buffers is set to ‘Y‘, when DBCHCL is called for the Connect function. However, any other request‘s responses on that session are double buffered, unless the setting of Two-response-buffers is changed before the request is submitted.

Although the value of Two-response-buffers is read and stored by the Connect function, it is not used for the connect operation itself.

When a non-zero Row-count is specified, the Two-response-buffers option should probably be set to 'N' because 'Y' is used to maximize fetching performance while Row-count is used to reduce it.