Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


DB2 coprocessor

When you use the DB2 coprocessor (called SQL statement coprocessor by DB2), the compiler handles your source program that contains embedded SQL statements without your having to use a separate precompile step.

When the compiler encounters SQL statements in the source program, it interfaces with the DB2 coprocessor. This coprocessor takes appropriate actions for the SQL statements and indicates to the compiler which native COBOL statements to generate for them.

Although the use of a separate precompile step continues to be supported, use of the coprocessor is recommended:

Compiling with the DB2 coprocessor generates a DB2 database request module (DBRM) along with the usual COBOL compiler outputs such as object module and listing. The DBRM writes to the data set that you specified in the DBRMLIB DD statement in the JCL for the COBOL compile step. As input to the DB2 bind process, the DBRM data set contains information about the SQL statements and host variables in the program.

You must specify the SQL compiler option to compile programs that use the DB2 coprocessor.

related concepts  
COBOL and DB2 CCSID determination

related tasks   
Compiling with the SQL option

related references
Differences in how the DB2 precompiler and coprocessor behave
SQL
  


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)