Skip to main content

Problem:

In some circumstances, such as no connection to a database, the SQLCODE returned from Oracle is zero even though the SQL statement was not successful.

Resolution:

Using the CP pre-processor with the Pro*COBOL MODE=ANSI option can cause this problem and is caused by the expansion of the INCLUDE SQLCA statement by the CP pre-processor before the expanded code is submitted to the Pro*COBOL pre-processor.

Problem can be resolved by using the SY option with the CP pre-processor which prevents the CP pre-processor from expanding the SQLCA.

Please refer to the COBSQL section of the Database Access manual for more information on the CP pre-processor and the SY directive.

Old KB# 2294