ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

MCH1202 decimal data error - help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MCH1202 decimal data error - help

    Hi I have problem, with I can't manage right now.

    Before change everything worked fine.
    I changed length of field using CHGPF, field ACTVAL(13 0) to ACTVAL(23 0).

    In my program I have field PACKID (9 0) which gets result of function : PACKID = getnumber('xxx'); ----> this function returns ACTVAL (23 0), ealier it was 13 0 and worked fine.
    After that call i have error MCH1202 Decimal data error. I dont know whats going on, I checked everything.

  • #2
    Re: MCH1202 decimal data error - help

    Originally posted by michal2442
    I dont know whats going on, I checked everything.
    Somewhere in your program, you have a variable that declared memory as holding decimal data. And somewhere else in your program, you have something that puts a value into that area; but the bit pattern desn't match what the decimal data declaration expects. Either the operation that tries to put the data there or an operation that tries to use it fails because of the mismatched bit pattern.

    That's about all anyone can say until you show us all of the relevant definitions and any code that populates that memory and the code that fails.
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • #3
      Re: MCH1202 decimal data error - help

      Originally posted by michal2442
      I dont know whats going on, I checked everything.
      Somewhere in your program, you have a variable that declared memory as holding decimal data. And somewhere else in your program, you have something that puts a value into that area; but the bit pattern desn't match what the decimal data declaration expects. Either the operation that tries to put the data there or an operation that tries to use it fails because of the mismatched bit pattern.

      That's about all anyone can say until you show us all of the relevant definitions and any code that populates that memory and the code that fails.
      Tom

      There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

      Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

      Comment


      • #4
        Re: MCH1202 decimal data error - help

        It sounds like you didn't change the "function" to process (23 0) so it is returning (13 0) plus spaces.

        best of luck
        gls
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment

        Working...
        X