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 Visual COBOL Project
Before compiling from within Visual COBOL:
  1. Open your project properties and click the SQL tab.
  2. From the ESQL Preprocessor drop-down list, select OpenESQL.
  3. Click Add; then click DBMAN on the list of directives.
  4. From the Value drop-down list, select ODBC or ADO; then click OK.
  5. To add another directive, select a directive from the Available Directives list.
  6. If required, provide details using the controls under Directive Details.
  7. Click OK. The directive is added to the SQL Directives field.
  8. Repeat this procedure to add additional directives.
On the Command Line
Use the SQL compiler directive, followed by the DBMAN option to specify the type of database access:

SQL(DBMAN=dbaType)

Where dbaType is ODBC or ADO.

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 ADO, 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