From: Steve Rainbird on 8 Jan 2010 16:04 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),' ') ,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. 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 null. This is very strange and I have no idea why it is happening. TIA -- Steve
From: Shakespeare on 8 Jan 2010 16:54 Op 8-1-2010 22:04, Steve Rainbird schreef: > 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),' ') > ,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. > > 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 null. > > This is very strange and I have no idea why it is happening. > > TIA > What happens if you put NVL's around all the assignments? (Or at least the first 4 or 5?) This can determine whether the error is in the update or in reading the host variables. Shakespeare
From: ddf on 8 Jan 2010 17:27 On Jan 8, 4:04 pm, "Steve Rainbird" <steve.nospam.rainb...(a)mssint.nospam.com> wrote: > 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),' ') > ,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. > > 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 > null. > > This is very strange and I have no idea why it is happening. > > TIA > > -- > Steve 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
From: Steve Rainbird on 8 Jan 2010 17:27 "Shakespeare" <whatsin(a)xs4all.nl> wrote in message news:4b47a9a9$0$22939$e4fe514c(a)news.xs4all.nl... > Op 8-1-2010 22:04, Steve Rainbird schreef: >> 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),' ') >> ,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. >> >> 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 null. >> >> This is very strange and I have no idea why it is happening. >> >> TIA >> > > What happens if you put NVL's around all the assignments? (Or at least the > first 4 or 5?) > This can determine whether the error is in the update or in reading the > host variables. > > Shakespeare If I put NVL around all the numeric fields then HAR_PMBROJ gets updated with zero (HAR-PMBROJ contains 84). -- Steve
From: Steve Rainbird on 8 Jan 2010 17:33 "ddf" <oratune(a)msn.com> wrote in message news:6a0439b7-705d-4427-b78c-52e487660c7e(a)r24g2000yqd.googlegroups.com... > On Jan 8, 4:04 pm, "Steve Rainbird" > <steve.nospam.rainb...(a)mssint.nospam.com> wrote: >> 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),' ') >> ,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. >> >> 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 >> null. >> >> This is very strange and I have no idea why it is happening. >> >> TIA >> >> -- >> Steve > > 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 This is the definition of the variables. 07 HAR-IMEPRT PIC X(20). 07 HAR-IMETER PIC X(20). 07 HAR-WINDOW PIC X(20). 07 HAR-TIPTER PIC X(10). 07 HAR-TIPPRT PIC X(10). 07 HAR-CEKPRT PIC X(20). 07 HAR-MJESTO PIC X(15). 07 HAR-TELBRO PIC X(10). 07 HAR-PORUKA PIC X(6). 07 HAR-POSJED PIC 9(3). 07 HAR-KESBOY PIC 9(6). 07 HAR-AMBROJ PIC 9(2). 07 HAR-PMBROJ PIC 9(2). 07 HAR-STATUS PIC 9(1). 07 HAR-REDBRO PIC 9(8). 07 HAR-UPDATE PIC 9(8). 07 HAR-SATMIN PIC 9(8). 07 HAR-TELLER PIC 9(1). 07 HAR-CEKOVI PIC 9(1). 07 HAR-PRTOFF PIC 9(1). Steve I -- Steve
|
Next
|
Last
Pages: 1 2 Prev: Global Warming and what you can do to against it Next: Oracle Warehouse Automation |