Skip to main content

Problem:

You may encounter a return code of 128 (or similar) when executing a Cobol program which connects to a database (Oracle in this case) and then exits with COMMIT WORK RELEASE.

Resolution:

Use the  DEFAULTCALL"4" compiler directive to solve this problem.

This is a classic issue with regards to Oracle and call-convetions which fills the return-code in its routines. Call-convention 4 means that the return-code set in sub-routines are set like a local variable.

Refer to the product documentation for further details on CALL-CONVENTION and the DEFAULTCALLS compiler directive.

Old KB# 3820