Your client application program tells CLIv2 what to do by creating a request string consisting of:
When the response mode option is set in CLI or CLIv2, it automatically uses the correct request parcel format.
Unlike Teradata SQL, PM/API does not use a USING Phrase to name the variables and reserve space in the request parcel. Instead, each MONITOR request has a USING Data String of a particular fixed format that determines the order of items, their data types, and lengths.
Because a USING Data String is required, either a data parcel must follow a request parcel or an IndicData parcel must follow an IndicReq parcel.
An IndicData parcel is recommended, because several of the fields in the USING Data String can be NULL.
Generating an IndicReq parcel results in a response that contains a PclDataInfo parcel, which describes the number of response columns. Each Record parcel returned begins with a number of presence bits, that supply the NULL indicators for the result columns.
To pass PM/API requests to Teradata Database as the text portion (body field) of the request parcel, the application program calls the CLIv2 DBCHCL routine with the DBCAREA function code (4) set to the Initiate Request operation.
Code your application program to do the following before calling CLIv2 for the Initiate Request operation:
Note: For the IDENTIFY request, set the request pointer to the address of a character string containing one of the following:
Setting Indicator or Record Mode
You can send the USING Data String in either indicator mode or record mode. CLI must inform CLIv2 which mode is used by setting the appropriate use presence bits option in the DBCAREA.
Note: The use presence bits option is usually set to a default value for the site.
If you want...
Do the following ...
to change the default value
Set change options to Y in the application program.
Set the use presence bits option in the DBCAREA to Y.
Note: This also allows the application program to send NULL data to the Teradata Database system.
the USING Data String sent in record mode
|Set change options to Y in the application program. Set the use presence bits option to N in the DBCAREA in the application program.|