CliSQLExit2 - Call-Level Interface Version 2

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

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Call-Level Interface Version 2
Release Number
20.00
Published
January 2024
Language
English (United States)
Last Update
2024-05-14
dita:mapPath
bmn1691484839905.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
fvz1470444150352
Product Category
Teradata Tools and Utilities
typedef struct CliSQLExit2_struct
 {
    char       eye_catcher[4];   /* “PRE ” or "POST" */
    UInt32     level;            /* 2                */
    char       *SQL_Request_ptr;
    char       Start_date[80];
    UInt32    Clock_time;
    Int32     *SQL_len_ptr;
    UInt32    logsessid;
    UInt16    Process_Post; /* only applies to pre-SQL exits */
    char      fill_1[2];
    CliExit2_t opts;
 } CliSQLExit2_t, *CliSQLExit2_p;

The maximum allowable storage is allocated by CLI before the exits are called. Those lengths are stored in <var name>_max_len for future compatibility (and so that the exits know how much space they have).

If the exit changes the value of any field, it must also update its <var name>_actual_len. The charset field cannot be modified. When control returns back to CLI, the appropriate fields (all but charset) are copied back to their respective area in the scbptr. The memory allocated earlier by CLI is then freed (unless Process_Post is set, in which case it is freed after CliPostSQLExt2 call). Other than memory allocation changes, the behavior is the same as the original user exits.