Chapter 9 SQL Statements
549
INCLUDE statement [ESQL]
Use this statement to include a file into a source program to be scanned by
the SQL preprocessor.
INCLUDE
filename
filename
:{ SQLDA | SQLCA |
string
}
None.
None.
The INCLUDE statement is very much like the C preprocessor #include
directive. The SQL preprocessor reads an embedded SQL source file and
replaces all the embedded SQL statements with C-language source code. If a
file contains information that the SQL preprocessor requires, include it with
the embedded SQL INCLUDE statement.
Two file names are specially recognized: SQLCA and SQLDA. The
following statement must appear before any embedded SQL statements in all
embedded SQL source files.
EXEC SQL INCLUDE SQLCA;
This statement must appear at a position in the C program where static
variable declarations are allowed. Many embedded SQL statements require
variables (invisible to the programmer), which are declared by the SQL
preprocessor at the position of the SQLCA include statement. The SQLDA
file must be included if any SQLDAs are used.
♦
SQL/92 Entry level feature.
♦
Sybase Supported by Open Client/Open Server.
Function
Syntax
Permissions
Side effects
Description
Standards and
compatibility