Single Session Example
Each horizontal item in Table 1 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 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. |