Previous Topic Next topic Print topic


Using COBSQL

To use COBSQL, specify the PREPROCESS(cobsql) Compiler directive when you compile your program. All directives following it are passed from the Compiler to COBSQL. You can specify Compiler directives by using $SET statements in your program or via the Additional Directives field, located on the COBOL tab of your project's Properties dialog box.

To terminate the directives to be passed to COBSQL, you must use the ENDP COBOL directive.

END-C and ENDP have the following effect:

preprocess(cobsql) cobsqltype=database_product end-c 
    comp5=yes endp;

where database_product is one of Oracle, Sybase or Informix. For example, for Oracle:

preprocess(cobsql) cobsqltype=oracle end-c comp5=yes endp;

Because the system sets extra default COBOL directives, the above line is required when putting directives into the Additional Directives field.

Examples

cobol testprog p(cobsql) cobsqldirectives END-C precompileroptions ENDP compilerdirectives;
cobol testprog p(cobsql) csqlt=ora makesyn end-c xref=yes mode=ansi endp list();

·         

The COBSQL directives, terminated by end-c, are csqlt=ora and makesyn. The precompiler directives (in this case, Pro*COBOL), terminated by endp, are xref=yes and mode=ansi. The Compiler directive is list().

Previous Topic Next topic Print topic