Single Session Example - Call-Level Interface Version 2

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

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Call-Level Interface Version 2
Release Number
20.00
Published
January 2024
Language
English (United States)
Last Update
2024-05-14
dita:mapPath
bmn1691484839905.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
fvz1470444150352
Product Category
Teradata Tools and Utilities

Each horizontal item in the following table represents a call to DBCHCL, with function code set as in the left column.

Function Description
Connect Obtain CLI2SCB, CLI2RCB, buffers; send logon; and, if options so specify, await completion; send run and return. Application must have set address and length of logon string. All other arguments (buffer sizes, run string, and various other arguments) are optional and default if they are left unset.
Fetch Fetch response data, either a Success or a Failure parcel.
Initiate Request Send Teradata SQL request to the database. Application must set address and length of Teradata SQL request and optional using data. DBCHCL builds request buffer (adds Response parcel) and sends request.
Fetch Fetch response data. DBCHCL returns address and length of first parcel (or buffer, if in Buffer Mode). If dual buffering was specified and the current buffer is not the last response buffer, DBCHCL immediately sends a continue request to retrieve the next “buffer full of data”. Thus, the continue request process is overlapped with consumption of the first buffer. If dual buffering is not in effect, DBCHCL sends the continue request when the current buffer is exhausted.
End Request Clean up request-related context. Disconnect. Log off the database and free the session-related control blocks.