ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Arithmetic computation won't compile on V7R3M0

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

  • Arithmetic computation won't compile on V7R3M0

    We moved to a new machine with V7R3M0.

    One of our programs has this line of code:
    IF (WS-P45-ADMIT-DATE-YY-NUM + 1) NOT = WS-P45-DISCHARGE-DATE-YY-NUM

    It compiles under V7R2M0 & V7R1M0,

    But v7R3M0 throws:
    4662 MSGID: LNC2714 SEVERITY: 30 NUMBER:
    Message . . . . : 'WS-P45-DISCHARGE-DATE-YY-NUM' cannot be compared to an arithmetic expression. Statement ignored.

    Compiler: 5770WDS V7R3M0 160422 LN IBM ILE COBOL

    Besides fixing the code Does anyone know a way to get around this

    Thanks
    John M. Mauro
    Software Engineer
    nThrive

  • #2
    It would help to know the data types of the fields. I'm assuming they are numeric in which case I can't see why this would be occurring. Have you checked your PTF levels?

    Comment


    • #3
      I apologize. All fields are declared as pic 99. Thanks. I'll see what I can find about PTFS
      I find it strange it compiles under v7r2m0 & v7r1m0 but not v7r3m0
      John M. Mauro
      Software Engineer
      nThrive

      Comment


      • #4
        Well this:
        Code:
        IDENTIFICATION DIVISION.
        PROGRAM-ID. SIMPLE.
        DATA DIVISION.
        WORKING-STORAGE SECTION.
        77 admit pic 99.
        77 discharge pic 99.
        PROCEDURE DIVISION.
        MAINLINE.
        If ( admit + 1 ) not = discharge
        display "Not equal"
        Else
        display "Equal"
        end-if.
        Stop Run.
        Compiles just fine on V7.4 - so I'm guessing it is your system that is the problem. If it compiles at 7.1 and 7.2 then my guess is IBM changed something in 7.3 and it broke your code. Too trivial a problem not to have been noticed by now so there is almost certainly a PTF for it.

        P.S. If you haven't already isolated the problem down to the smallest demonstrable test case (like mine here) I suggest you do it before reporting the issue to IBM (assuming you can't just find the PTF).

        Comment


        • #5
          If you don't find a PTF then try to compile it to the previous release

          CRTBNDCBL TGTRLS(V7R2M0)

          Comment


          • #6
            Thanks for you Help. I will have the people responsible for the PTF's look at this.
            Appreciate it .


            Peder Udsen,
            We have changed the default for the Cobol compiler to V7R1M0 as that is the level we distribute to our clients. The V7R3M0 is for the future development
            John M. Mauro
            Software Engineer
            nThrive

            Comment


            • #7
              Originally posted by johnmauro View Post
              The V7R3M0 is for the future development
              I'm glad you added the smiley given that your "future" is about to join the history book with the intro of V7.5 expected in a couple of weeks!

              Comment

              Working...
              X