15.10 - Request Buffer - Call-Level Interface Version 2

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

prodname
Call-Level Interface Version 2
vrm_release
15.10
category
Programming Reference
featnum
B035-2417-035K

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 if User 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.