From: Mark D Powell on
On Jan 8, 5:33 pm, "Steve Rainbird"
<steve.nospam.rainb...(a)mssint.nospam.com> wrote:
> "ddf" <orat...(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- 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 --
From: Steve Rainbird on

"Mark D Powell" <Mark.Powell2(a)hp.com> wrote in message
news:7e7e1966-03e1-46bf-b2d5-535caa567f24(a)m25g2000yqc.googlegroups.com...
> On Jan 8, 5:33 pm, "Steve Rainbird"
> <steve.nospam.rainb...(a)mssint.nospam.com> wrote:
>> "ddf" <orat...(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- 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 --

Thanks,

No the digits are not overpunched in any way. but I will try it with signed
fields and see if that makes any difference.

There no indicator variables used, and in any case if they were they would
have to be specified in the UPDATE statement.

:HAR-PMBROJ:HAR-PMBROJ-IND or something like that I seem to remember.

--
Steve

From: Shakespeare on
Op 8-1-2010 22:54, Shakespeare schreef:
> 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 this one must conclude that the variables are not read anymore.
The update part is working. Seems some buffer is oveflowed.

Shakespeare