Purpose
Incorporates an external source file into the application program.
Invocation
Nonexecutable preprocessor declaration.
Embedded SQL only.
Syntax
INCLUDE include_file_name
- include_file_name
- The name of the source file to be included.
ANSI Compliance
INCLUDE is ANSI/ISO SQL:2011-compliant.
Authorization
None.
Rules for Using INCLUDE
- Preprocessor2 searches the directory path for a file having the specified name and a language specific file extension:
For this language … Preprocessor2 searches for this INCLUDE file type … C pc COBOL pb PL/I pi - The length of the INCLUDE filename can be up to 30 bytes.
- The INCLUDE statement is effectively replaced by the included text in the application program input to Preprocessor2.
- INCLUDE statements cannot be nested.
Included text can contain any embedded SQL statements except another INCLUDE.
- You can specify INCLUDE SQLCA and INCLUDE SQLDA statements in the included text.
Related Topics
For more information about INCLUDE SQLCA and INCLUDE SQLDA, see INCLUDE SQLCA and INCLUDE SQLDA.