Collection Contents Index IF statement [T-SQL] INPUT statement [ISQL] pdf/chap9.pdf

Reference Manual
   CHAPTER 9. SQL Statements     

INCLUDE statement [ESQL]


Function 

Include a file into a source program to be scanned by the SQL source language preprocessor.

Syntax 

INCLUDE filename

Parameters 

filename: identifier

Permissions 

None.

Side effects 

None.

Description 

The INCLUDE statement is very much like the C preprocessor #include directive. The SQL preprocessor reads the given file, and inserts its contents into the output C file. Thus, if an include file contains information that the SQL preprocessor requires, it should be included with the Embedded SQL INCLUDE statement.

Two file names are specially recognized: SQLCA and SQLDA. Any C program using Embedded SQL must contain an

EXEC SQL INCLUDE SQLCA;

statement before any Embedded SQL statements. 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.

Standards and compatibility 


Collection Contents Index IF statement [T-SQL] INPUT statement [ISQL] pdf/chap9.pdf