The following table lists the use of three most common CLIv2 routines and describes how they are used.
Routine | Description | |||
---|---|---|---|---|
DBCHINI | What | Initializes the application allocated DBCAREA. | ||
Why | Prepares for interaction with CLIv2. | |||
DBCHCL | What | Manages interaction with the database; each type of interaction is called a function. | ||
Why | Sends/receives Teradata SQL requests/responses to/from the database. The following table lists the functions associated with the DBCHCL routine. | |||
Function Name | What it Represents | Use | ||
CON | Connect | Logs a session on to a database and specifies a set of services | ||
RSUP | RunStartUp | Submits a request to execute the startup request stored on the database | ||
IRQ | Initiate Request | Submits a Teradata SQL request from the application | ||
IWPF | Initiate With Protocol-function | Submits a Teradata SQL request from the application and allows Two-phase commit protocol sync point performance optimization | ||
CRQ | Continue Request | Provides data requested by the database to complete an SQL request | ||
CMD | Command | Issues a TDP command within a CLIv2 program | ||
ABT | Abort | Aborts a request asynchronously | ||
FET | Fetch | Makes available the next parcel or buffer (which one depends on the setting of Parcel Mode) of the Teradata SQL response | ||
REW | Rewind | Repositions to start of Teradata SQL response (spool file) | ||
ERQ | End Request | Closes a Teradata SQL request and has the database discard the response | ||
DSC | Disconnect | Logs off and deletes a session | ||
DBCHCLN | What | Logs off all sessions and releases the internal CLIv2 memory areas allocated by DBCHINI | ||
Why | To clean up after interacting with the database |