![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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. IfI 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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
On Jan 8, 4:04 pm, "Steve Rainbird" steve.nospam.rainb... (AT) mssint (DOT) 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 |
#6
| |||
| |||
|
|
"ddf" <orat... (AT) msn (DOT) com> wrote in message news:6a0439b7-705d-4427-b78c-52e487660c7e (AT) r24g2000yqd (DOT) googlegroups.com... On Jan 8, 4:04 pm, "Steve Rainbird" steve.nospam.rainb... (AT) mssint (DOT) 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 getsa 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- Hide quoted text - - Show quoted text - |
#7
| |||
| |||
|
|
On Jan 8, 5:33 pm, "Steve Rainbird" steve.nospam.rainb... (AT) mssint (DOT) nospam.com> wrote: "ddf" <orat... (AT) msn (DOT) com> wrote in message news:6a0439b7-705d-4427-b78c-52e487660c7e (AT) r24g2000yqd (DOT) googlegroups.com... On Jan 8, 4:04 pm, "Steve Rainbird" steve.nospam.rainb... (AT) mssint (DOT) 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- Hide quoted text - - Show quoted text - If I remember my COBOL, Pic 9(2) is numeric character, that is, the character format of a numeric digit: 0 - 9. Is the raw values signed or over-punched by any chance. If so PIC S9(02) should fix the issue. Does your code use null indicator bytes? Are these set correctly. I have never coded pro*COBOL but in pro*C you have to set the length bytes in the corresponding Oracle structure for variable character columns. If this needs to be done in COBOL were the corresponding length bytes for the first few character fields set correctly. HTH -- Mark D Powell -- |
#8
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |