Single Session Example - Teradata Tools and Utilities

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

Product
Teradata Tools and Utilities
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-18
dita:mapPath
lvt1544831946862.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

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

Function Description
Connect

Application must have set address and length of logon string.

All other arguments (buffer sizes, run string, and various other arguments) are optional and will default if they are left unset.

Fetch Fetch response data, always one of the following parcels:
  • Success
  • Error
  • StatementError
  • Failure
Initiate Request

Send Teradata SQL request to the database.

Application must set address and length of the Teradata SQL request and optional using data.

Fetch

Fetch response data. DBCHCL returns address and length of first parcel (or buffer, if in buffer mode).

The DBCHCL does the following, depending on whether dual buffering is specified and the status of the current buffer:
  • If dual buffering is specified and the current buffer is not the last response buffer, DBCHCL immediately dispatches 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 specified and the current buffer is in any status, DBCHCL transparently dispatches the continue request when the current buffer is exhausted.
End Request Clean up request-related context.
Disconnect Log off from the database and free the session-related control blocks