Was this helpful?
The Include Statement
The embedded OpenSQL INCLUDE statement lets you include external files in your source code. The syntax of the INCLUDE statement is as follows:
EXEC SQL INCLUDE filename;
This statement is commonly used to include an external file containing variable declarations. For example, assuming you have a file, myvars.dec, that contains a group of variable declarations, you can use the INCLUDE statement in the following manner:
exec sql begin declare section;
exec sql include 'myvars.dec';
exec sql end declare section;
This is the functional equivalent of listing all the declarations in the myvars.dec file in the declaration section itself.
For details about the INCLUDE statement, see Include in the chapter “OpenSQL Statements.”
Last modified date: 11/28/2023