Single Session Example - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2418
lifecycle
previous
Product Category
Teradata Tools and Utilities

Single Session Example

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

 

Table 1: Single Session Sequence 

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 will 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 Teradata 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 will return 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 will immediately dispatch 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 will dispatch the continue request when the current buffer is exhausted.

End Request

Clean up request‑related context. Disconnect. Log off the Teradata Database and free the session‑related control blocks.