You can use include for the following types of files:
define
creates a name-flag definition. The scope of this definition is from the point where you define it to the end of the ESQL/C source file.
undef
removes a name flag that EXEC SQL define or $define creates.
The ESQL/C preprocessor rather than the C preprocessor (which processes #define and #undef) processes these directives. The ESQL/C preprocessor creates (define) or removes (undef) these definitions in stage 1 of preprocessing. The ESQL/C define directive can create definitions with the following formats:
The ifdef, ifndef, elif, else, and endif Directives The ESQL/C preprocessor supports the following directives for conditional compilation:
ifdef
tests a name and executes subsequent statements if define has created the name.
ifndef
tests a name and executes subsequent statements if define has not created the name.
elif
begins an alternative section to an ifdef or ifndef condition and checks for the presence of another define.
else
begins an alternative section to an ifdef or ifndef condition.
endif
closes an ifdef or ifndef condition.
In the following example, the BEGIN WORK statement only compiles if you have previously defined the name USETRANSACTIONS with a define directive: