Generally, you also set applicable preprocessor compiler directive options when you specify the preprocessor; however, you
can use a combination of methods at your preference. The order in which the COBOL compiler calls the preprocessor depends
on where you specify it. We provide several alternatives:
- On the Command Line
- When compiling from the command line, you can specify your ESQL preprocessor and its directives in the sequence of compiler
directives specified as arguments to the
cobol command.
- In a Directives File
- You can specify your
SQL preprocessor and its directives in the
cobol.dir system-wide directives file and/or in a user directives file.
- Embedded in the Program
- You can also specify a preprocessor on the program level by embedding a $SET statement into the program itself. Use this method
only when the program requires a preprocessor different from other programs in an application.
For details on setting specific
SQL preprocessors, see
Related concepts below.