Pro*COBOL Application Inserts Null Into Table Instead of Valid Variable Values (Doc ID 1061399.1)

Last updated on JULY 05, 2017

Applies to:

Precompilers - Version: 11.1.0.7.0 and later   [Release: and later ]
Information in this document applies to any platform.
Pro*COBOL

Symptoms

Pro*COBOL application on Oracle 11g 11.1.0.7, COBOL application updating column value with NULL even though the host variable was populated with a valid value. 

For example:  

Column HAR_PMBROJ of table HARDVER is being updated with a NULL even though HAR-PMBROJ contains a valid variable value of 84.

UPDATE statement: 

EXEC SQL UPDATE HARDVER SET
HAR_IMEPRT=NVL(RTRIM(:HAR-IMEPRT),' ')
,HAR_IMETER=NVL(RTRIM(:HAR-IMETER),' ')
,HAR_WINDOW=NVL(RTRIM(:HAR-WINDOW),' ')
,HAR_TIPTER=NVL(RTRIM(:HAR-TIPTER),' ')
,HAR_TIPPRT=NVL(RTRIM(:HAR-TIPPRT),' ')
,HAR_CEKPRT=NVL(RTRIM(:HAR-CEKPRT),' ')
,HAR_MJESTO=NVL(RTRIM(:HAR-MJESTO),' ')
,HAR_TELBRO=NVL(RTRIM(:HAR-TELBRO),' ')
,HAR_PORUKA=NVL(RTRIM(:HAR-PORUKA),' ')
,HAR_POSJED=:HAR-POSJED
,HAR_KESBOY=:HAR-KESBOY
,HAR_AMBROJ=:HAR-AMBROJ
,HAR_PMBROJ=:HAR-PMBROJ
,HAR_STATUS=:HAR-STATUS
,HAR_REDBRO=:HAR-REDBRO
,HAR_UPDATE=:HAR-UPDATE
,HAR_SATMIN=:HAR-SATMIN
,HAR_TELLER=:HAR-TELLER
,HAR_CEKOVI=:HAR-CEKOVI
,HAR_PRTOFF=:HAR-PRTOFF
WHERE ROWID=:HARDVER-ROWID
END-EXEC;

All of the host variables have values in them.

If you comment out one of the assignments above HAR_PMBROJ then HAR_PMBROJ is fine but the next column in the update statement HAR_STATUS gets a null. 

If you comment out 2 of the assignments above HAR_PMBROJ then HAR_REDBRO gets a null.

Changes

Application and Database was upgraded from Oracle 10g 10.2.0.4.0 to Oracle 11g 11.1.0.6.0. 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms