16.20 - Single Session Example - 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

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 Teradata Database.

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

Fetch

Fetch response data. DBCHCL will return 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 Teradata Database and free the session-related control blocks