Previous Topic Next topic Print topic


Setting the OpenESQL Preprocessor and Compiler Directive Options

You can specify the OpenESQL preprocessor and its directive options using any of the following methods:
In your Enterprise Developer Project
Before compiling from within Enterprise Developer:
  1. 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.
  2. If unchecked, check Enable configuration specific settings and Use SQL Preprocessor.
  3. From the Preprocessor Type drop-down list, select OpenESQL.
  4. Type the name of your database into the Value field of the DB setting.
  5. To specify the type of database access you want, use the grid to set the value of the DBMAN directive to ODBC or JDBC.
  6. Click Apply.
  7. 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:

  1. 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.
  2. 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.

On the Command Line
Use the SQL compiler directive, followed by the DBMAN option to specify the type of database access:

SQL(DBMAN=dbaType) (Windows)

Or:

SQL(DBMAN==dbaType) (UNIX)

Where dbaType is ODBC or JDBC.

In a Directives File
You can include OpenESQL 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 OpenESQL 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 SQL(DBMAN=dbaType [SQLdirOpts])

Where dbaType is ODBC or JDBC, and SQLdirOpts is one or more additional directive options.

Important: Use this method only when the program requires a preprocessor different from other programs in an application.
Previous Topic Next topic Print topic