16.20 - Request Buffer - Teradata Tools and Utilities

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

prodname
Teradata Tools and Utilities
vrm_release
16.20
created_date
September 2019
category
Programming Reference
featnum
B035-2417-108K

Information to be sent to the Teradata Database is placed by CLIv2 in a request buffer. CLIv2 allocates a single request buffer per session. The allocation takes place when the session is first established. DBCHCL automatically:

  • Expands the buffer if it is too small to hold the request being prepared.
  • Shrinks the buffer if Request-buffer-length is less than Current-request-buffer-length.

DBCHCL uses field values that the application has placed in the DBCAREA to determine which parcels to send to the Teradata Database and what to put in them. The application does not see the request buffer.

How to Calculate Maximum Length

The maximum length (in bytes) needed for the request buffer can be calculated as follows:

maximum  Request-buffer-length  = 
   (14 if Request-processing-option = ‘P‘) +
   (4 + the maximum length of a request string) +
   (4 + the maximum length of using data,
      including indicator bytes ifUser Presence Bits 
      is set to ‘Y‘) +
   (length of parcels in any {DBCAIRX extension} +
   (6 for overhead)

The second and fifth lines are always included in the calculation. The third line is included only if data is being sent to the Teradata Database. The first line is included only if Request-processing-option = P.