INCLUDE SQLCA | Teradata Vantage - INCLUDE SQLCA - Teradata Vantage - Analytics Database

SQL Stored Procedures and Embedded SQL

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
frc1628111662093.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
rjx1472253414573
lifecycle
latest
Product Category
Teradata Vantageā„¢

Defines the SQL Communications Area (SQLCA) in a client embedded SQL application program.

ANSI Compliance

INCLUDE SQLCA is a Teradata extension to the ANSI/ISO SQL:2011 standard.

Required Privileges

None.

Invocation

Nonexecutable preprocessor declaration.

Embedded SQL only.

Syntax

INCLUDE SQLCA

Usage Notes

  • When operating in Teradata session mode, you must declare exactly one SQL Communications Area in your embedded SQL application program.

    You can use either an INCLUDE SQLCA statement or an equivalent user-supplied declaration.

  • When operating in ANSI session mode, Preprocessor2 flags INCLUDE SQLCA statements as an error.

    ANSI/ISO SQL requires you to explicitly define a result code variable named SQLSTATE.

    If you are operating in ANSI mode, you can also define an SQLCODE result code variable to receive error codes.

    ANSI/ISO SQL no longer supports SQLCODE.

  • The complete INCLUDE SQLCA statement, including the EXEC SQL prefix and the appropriate terminator, must be coded on one line.

    Only a pad character can separate the words of the statement.

    No other statements can appear on the line.

  • Preprocessor2 replaces the INCLUDE SQLCA statement with the appropriate language definition of the SQL Communications Area.
  • For applications written in COBOL, the SQL Communications Area declaration must appear in the WORKING STORAGE SECTION.

Related Information