Previous Topic Next topic Print topic


PREPROCESS(cobsql)

Describes the use of the PREPROCESS compiler directive with the (cobsql) option, used to compile COBSQL programs and applications.

Syntax

cob -C "{preprocess | p}(cobsql) [[[{cobsqltype|csqlt}==preCompiler] [COBSQLopts] {end-cobsql|end-c|end}] [PreCompilerOpts endp]]"

Parameters

preCompiler
The name of a third-party database precompiler. Default is oracle8. See COBSQLTYPE, CSQL for a full list of valid values.
COBSQLopts
COBSQL compiler directive options. See COBSQL Compiler Directive Options for complete information on each option.
end-cobsql|end-c|end
Signals the end of COBSQL options.
PreCompilerOpts
Third-party precompiler directive options.
endp
Signals the end of options specified for the PREPROCESS directive.

Comments

cobsql must be in lower case.

end-c and endp have the following effect:

  • Directives placed before end-c pass to COBSQL.
  • Directives placed between end-c and endp pass via COBSQL to the third-party precompiler.
  • Directives placed after endp pass to the COBOL compiler.
    Warning: Be careful not to omit the endp before adding COBOL compiler directives. COBSQL continues to process directives until it reaches endp; therefore, if you omit it, your COBOL directives are processed by COBSQL instead of the COBOL compiler.

Examples

Oracle
cob –k testprog.pco –C "p(cobsql) csqlt==ora makesyn end-c xref==yes mode==ansi endp ans85"

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 COBOL compiler directive is ans85.

cob -k sample.pco anim "preprocess(cobsql) csqlt==ora end-c comp5==yes endp"

The COBOL compiler directive specified is anim. The COBSQL directive, initiated by preprocess(cobsql) and terminated by end-c, is csqlt==ora. The precompiler directive (in this case, Pro*COBOL), terminated by endp, is comp5==yes.

Sybase
cob -a -v -P -k example1.pco -C "p(cobsql) CSQLT==syb endp"
Informix
cob -a -k demo1.eco -C "p(cobsql) 
    cobsqltype==informix-new endp"
Previous Topic Next topic Print topic