Re: Pro*cobol Spurious nulls being updated into database
Date: Fri, 8 Jan 2010 14:27:11 -0800 (PST)
On Jan 8, 4:04 pm, "Steve Rainbird"
> I have a strange issue which I will probably report as a bug but thought i
> would pass by you guys 1st.
> I have an 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),' ')
> WHERE ROWID=:HARDVER-ROWID
> All of the host variables have values in them.
> For some reason HAR_PMBROJ is being updated with a null even thougth
> HAR-PMBROJ contains 84.
> If I comment out one of the assignments above HAR_PMBROJ then HAR_PMBROJ is
> ok but the next column in the update statement HAR_STATUS gets a null. If I
> comment out 2 of the assignments above HAR_PMBROJ then HAR_REDBRO gets a
> This is very strange and I have no idea why it is happening.
What is the total length of all of these variables? Have you exceeded the line length restriction in COBOL or for Pro*COBOL? Since this NULL 'walks' the variable list as you comment out preceeding entries it might be a bug that's reading the line terminator as a value.
All pure speculation, to be honest.
David Fitzjarrell Received on Fri Jan 08 2010 - 16:27:11 CST