The SQL Communications Area and the INCLUDE SQLCA statement are not ANSI-SQL compliant. When the preprocessor TRANSACT or -tr option is set to ANSI, it flags INCLUDE SQLCA as an error.
ANSI mode applications report program status and errors by means of the SQLSTATE and SQLCODE status variables (see SQLSTATE Mappings for information about mapping SQLCODE and SQLSTATE variables to one another and to Teradata Database error messages).
The ANSI/ISO SQL-92 standard explicitly deprecates SQLCODE. The ANSI/ISO SQL-99 standard no longer defines SQLCODE. You should always use SQLSTATE when writing stored procedures and embedded SQL applications to run in ANSI transaction mode. You can also use SQLSTATE in your stored procedures and embedded SQL applications written to run in Teradata transaction mode.
When you are developing stored procedures or embedded SQL applications in the ANSI environment, use the status variable SQLSTATE in place of SQLCA and define it explicitly in your code. See SQLSTATE, SQLCODE and SQLSTATE Mappings for further information.