17.10 - CliSQLExit2 - Call-Level Interface Version 2

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

Call-Level Interface Version 2
Release Number
October 2021
Last Update
Content Type
Programming Reference
Publication ID
English (United States)
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.