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 cob command line.

Note: You must specify cobsql in lower case.

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

END-C and ENDP have the following effect:

cob -C "preprocess(cobsql) cobsqltype==oracle end-c comp5==yes endp"

Examples

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().

cob –k testprog.pco –C "p(cobsql) cobsqldirectives END-C precompileroptions endp compilerdirectives"
cob –k testprog.pco –C "p(cobsql) csqlt==ora makesyn end-c xref==yes mode==ansi endp ans85"
Previous Topic Next topic Print topic