Choose from the SQL Preprocessors supplied with
Visual COBOL to compile your applications.
- OpenESQL
- Before compiling from within
Visual COBOL:
- Open your project properties and
click the
SQL tab.
- From the
ESQL Preprocessor drop-down list, select
OpenESQL.
- Click
Add; then click
DBMAN on the list of directives.
- From the
Value drop-down list, select
ODBC or
ADO; then click
OK.
- To add another directive, select a directive from the
Available Directives list.
- If required, provide details using the controls under
Directive Details.
- Click
OK. The directive is added to the
SQL Directives field.
- Repeat this procedure to add additional directives.
- DB2 ECM
-
- Open your project properties and
click the
SQL tab.
- From the
ESQL Preprocessor drop-down list, select
DB2.
- Click
Add and choose
DB from the list of directives, and click
OK. Type the name of your database into the
Value field of the directive details.
Note: If you leave the value for DB blank, the compiler uses the database specified by the value of the DB2DBDFT environment variable.
- COBSQL
- Before compiling from within
Visual COBOL:
For Oracle Pro*COBOL, you can set the COBSQL preprocessor and compiler directives from the
SQL tab in your project properties:
- From the Solution Explorer, open your project properties, then click the
SQL tab.
- From the
ESQL Preprocessor list, select
Oracle Pro*COBOL (COBSQL).
- Click
Add, select a directive from the
Available Directives list, then click
OK. This places the directive in the
Directives list.
- Optionally, you can change the details for a directive by selecting it from the
Directives list and then modifying the fields and controls under
Directive Details.
- Repeat the previous two steps to add additional directives.
Note: When using this method, you can also specify Pro*COBOL directives to pass to the database precompiler by typing them directly
into the
Additional Directives field.
- Click
Apply and then
OK.
Note: Adding the
Oracle Pro*COBOL (COBSQL) preprocessor to the
SQL file or project property page automatically adds a read-only entry to the top of the preprocessors list in the
SQL 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.