Skip to main content

Problem:

Using Cobsql, programs compiled with the Pro*COBOL pre-compiler return 1403 for the NOT FOUND condition instead of 100.

Resolution:

1403 is the Oracle SQLCODE for a NOT FOUND condition, 100 is the ANSI standard return code for the same condition.

The default for the Pro*COBOL MODE is ORACLE.  This provides compatibility for programs written specifically for Oracle.  Programs written for othe RDBMS's and ported to Oracle or programs written using only ANSI standard SQL may require different behaviour so setting MODE=ANSI is one solution.

Another solution is to leave MODE=ORACLE and use END_OF_FETCH=100.  This can be set in the Pro*COBOL configuration file ($ORACLE_HOME/precomp/admin/pcbcfg.cfg by default) or as a command-line parameter to Pro*COBOL as follows:

preprocess(cobsql) csqlt=oracle8 end-c end_of_fetch=100 endp

Old KB# 2027