Choose from the SQL Preprocessors supplied with
Enterprise Developer to compile your applications.
- OpenESQL
- Before compiling from within
Enterprise Developer:
- Open your project properties and
expand
Micro Focus > Project Settings > COBOL > SQL Preprocessor.
Note: You can also set compiler directive options under
Micro Focus > Build Configurations > COBOL > SQL Preprocessor. 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
OpenESQL.
- Type the name of your database into the
Value field of the DB setting.
- To specify the type of database access you want, use the grid to set the value of the DBMAN directive to
ODBC or
JDBC.
- Click
Apply.
- Use the grid to select additional 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.
- Click in the
Additional directives field and type:
SQL(DBMAN=dbaType [SQLdirOpt])
Where
dbaType is
ODBC or
JDBC, and
SQLdirOpts is one or more additional directive options.
- DB2 ECM
-
- Open your project properties and
expand
Micro Focus > Project Settings > COBOL > SQL Preprocessor.
Note: You can also set the preprocessor under
Micro Focus > Build Configurations > COBOL > SQL Preprocessor. 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.
- Check
Enable configuration specific settings and
Use SQL Preprocessor.
- From the
Preprocessor Type drop-down list, select
HCO for DB2 LUW.
- Type the name of your database into the
Value field of the DB setting.
Note: If you leave the value for DB blank, the compiler uses the database specified by the value of the DB2DBDFT environment variable.
- Click
Apply.
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.
- Click in the
Additional directives field and type:
DB2[(DB=dbName [DB2dirOpts])]
Where
dbName is the name of your DB2 database, and
DB2dirOpts is one or more additional directive options.
Note: If you do not specify the DB option, the compiler uses the database specified as the value of the DB2DBDFT environment variable.
- XDB
(Windows)
-
- Open your project properties and
expand
Micro Focus > Project Settings > COBOL > SQL Preprocessor.
Note: You can also set the preprocessor under
Micro Focus > Build Configurations > COBOL > SQL Preprocessor. 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.
- Check
EXEC SQL.
- From the
Preprocessor Type drop-down list, select
XDB.
- Configure the database in the Client Options console (Click
Start > All Programs > Micro Focus Enterprise Developer
> Data Tools > SQL Option for DB2 > Configuration > Client Options).
- COBSQL
- Before compiling from within
Enterprise Developer:
Note: You can also set the preprocessor under
Micro Focus > Build Configurations > COBOL > SQL Preprocessor. 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 at the program level.
For Oracle Pro*COBOL, you can set the COBSQL preprocessor and compiler directives from the project's properties:
- Expand
Micro Focus > Project Settings > COBOL > SQL Preprocessor.
- Check
Use SQL Preprocessor.
- From the
Preprocessor Type list, select
Oracle Pro*COBOL(COBSQL).
- Under
Setting choose a directive and specify its value under
Value.
- Repeat the previous step to add additional directives.
- Click
Apply, then click
OK.
Note: Ensure that no conflicting preprocessor directives are set in
Additional Directives.
Note: Adding the
Oracle Pro*COBOL (COBSQL) preprocessor to the
SQL Preprocessor file, build configuration or project property page automatically adds a read-only entry to the top of the preprocessors list in the
Additional Preprocessors property page. If you have multiple preprocessors in the preprocessors list, you can change the sequence of execution by
moving preprocessors up and down the list. See section
Additional Preprocessors for more information.