Restriction: This topic applies to Windows environments only.
You can specify the XDB preprocessor and its directive options using any of the following methods:
- In your
Enterprise Developer Project
- Before compiling from within
Enterprise Developer:
- Open your project properties and
expand
Micro Focus > Project Settings > COBOL > SQL Settings.
Note: You can also set compiler directive options under
Micro Focus > Build Configurations > COBOL > SQL Settings. If you do this, the setting applies only when the build configuration is active, and the compiler directive option is not
set to something else in the Project Settings or on the program level.
- If unchecked, check
Enable configuration-specific settings and
Use SQL Preprocessor.
- From the
Preprocessor Type drop-down list, select
XDB.
- Use the grid to select directive options and set appropriate values. Click
Apply after each setting.
Alternatively, you can enter the preprocessor specification and options as additional directives:
- Open your project properties and expand
Micro Focus > Project Settings > COBOL.
Note: You can also set the preprocessor under
Micro Focus > Build Configurations > COBOL. If you do this, the setting applies only when the build configuration is active, and the preprocessor is not set to something
else in the Project Settings or on the program level.
- On the
COBOL page, check
Enable file specific settings.
- Click in the
Additional directives value cell and type:
XDB[(XDBdirOpts)]
Where
XDBdirOpts is one or more additional directive options, each separated by a space.
- On the Command Line
- Use the XDB compiler directive, followed by optional preprocessor options:
XDB[(XDBdirOpts)]
Where
XDBdirOpts is one or more additional directive options, each separated by a space.
- In a Directives File
- You can include XDB preprocessor directives in the
cobol.dir system-wide directives file, a user directives file, or both. See
System-wide Directives File, cobol.dir
and
User Directives File for details.
- Embedded in a Program
- You can also specify the XDB preprocessor and compiler directive options on the program level by embedding a
$SET statement into the program itself starting in column 1 on the first line of the program:
$SET XDB
Where
XDBdirOpts is one or more directive options, each separated by a space.
Important: Use this method only when the program requires a preprocessor different from other programs in an application.