


The following SQL statements are supported in the Data Division:
SQL INCLUDE SQL declarations
For example:
EXEC SQL INCLUDE SQLCA END-EXEC. EXEC SQL INCLUDE SQLDA END-EXEC. EXEC SQL INCLUDE filename END-EXEC. EXEC SQL BEGIN DECLARE SECTION END-EXEC. ... SQL declarations EXEC SQL END DECLARE SECTION END-EXEC.
SQL INCLUDE files
If desired, you can include files of terminal or ANSI format in your ESQL source by using the "SQL INCLUDE" statement.
The standard SQLCA and SQLDA INCLUDE files are built into the pre-compiler and are included whenever they are named in the source, as in:
EXEC SQL INCLUDE SQLCA END-EXEC.
These files include specific adaptations for AcuSQL. Do not attempt to substitute other versions of these files.
User-defined INCLUDE files must begin with a "SQL BEGIN DECLARE" statement and end with an "SQL END DECLARE" statement if the code is to be used as ESQL code. Variables not within the BEGIN/END DECLARE section cannot be used as host variables. They can still be used as "local" variables.
HOST-VARIABLES
The term "host-variable" describes any data item defined in an SQL DECLARE section of Working-Storage. Host-variables are often used in SQL statements and must be preceded with a colon (":"). For examples of their use in a CONNECT statement, see Section 2.4.1 CONNECT Statement.