The DB2 ECM has been enhanced to work with Object Oriented COBOL syntax (OO programs). There are, however, a couple of restrictions
that you should be aware of:
- The INIT option of the DB2 Compiler directive is disabled if used within an OO program. Therefore, to obtain the functionality
of the DB2(INIT=PROT) Compiler directive, include a non-OO module and compile it with this directive.
- If you use an EXEC SQL WHENEVER statement within a METHOD, any additional METHODs coded in the same CLASS that have SQL statements
in them need to have the section that is referenced in the preceding WHENEVER statement defined. Not doing this results in
a compilation error indicating that the section has not been defined. You can get around this restriction by defining another
EXEC SQL WHENEVER statement.