Unusual translate problem in CIS 5.8.5

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Unusual translate problem in CIS 5.8.5

  • Creator
    Topic
  • #53030
    Rich Durkee
    Participant

      In Cloverleaf 5.6 we had an Xlate that was using the %l1 variable like this –

      { { OP ADD }

                 { ERR 0 }

                 { IN {{$%g3} =1} }

                 { OUT {{$%l1}} }

                 { FUNCTION ADD }

      It worked fine – one was added to the value in %g3 and it was stored in %l1. In Cloverleaf 5.8.5 the same statment yields a blank in %l1. As you can imagine this caused a great deal of problems and was VERY difficult to find. I do not know what changed in 5.8.5 to cause statments like this to yield a blank value. But now it’s got me wondering what other surprises 5.8.5 has in store. When I changed all instances of %l1 to %g98, the translate worked fine. We probably should have used g98 or similar in the first place but still…… it worked Ok in 5.6. The letter in %l1 is el – between k and m.

    Viewing 6 reply threads
    • Author
      Replies
      • #76299
        Jim Kosloskey
        Participant

          Rich,

          I drove by your organization tonight.

          Is %l1 in use by an ITERATE elsewhere in your Xlate by any chance?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #76300
          Rich Durkee
          Participant

            No, it is not.  It’s just a made up variable, but it is used when creating OBX segments, like this. I did not write this Xlate. I inherited it and there  definitely is  some non-standard coding in it, but it works in 5.6.

            { { OP COPY }

                       { ERR 0 }

                       { IN =LABM }

                       { OUT {{1(0).1(%g4).1(%l1).OBX(0).#3(0).[2]}} }

                   }

          • #76301
            Jim Kosloskey
            Participant

              Rich,

              Interesting.

              One thing I do with the Iterate variables I make up is to initialize them at the beginning of the Xlate (COPY =0 –> $%l1 for example).

              However if you added the %g98 variable, did not initialize, and it worked where the %l1 did not that is strange.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #76302
              Boris Perov
              Participant

                Rich,

                Some other folks ran into this undocumented new feature.

              • #76303
                Rich Durkee
                Participant

                  Lawson confirmed that this is a bug in 5.8.5 and maybe earlier patch levels. I am not sure where the problem was introduced. So if you are planning on migrating to 5.8.5 you might want to make sure you are not using the %l1 variable.

                • #76304
                  Robert Milfajt
                  Participant

                    Is that limited to the %l1 variable, or any %lnn variable?  What is the fix if you are using %l1 (I have one) and am planning to migrate to 5.8.5 later this Spring.

                    Thanks,

                    Bob

                    Robert Milfajt
                    Northwestern Medicine
                    Chicago, IL

                  • #76305
                    Mark Thompson
                    Participant

                      Interesting that this is now a bug.  Here is the note we received from Lawson Support:

                      Quote:

                      Behavior has changed as a result of AR6233. It is expected now that %l points to a real list (this is normally initialized in list ITERATE with Basis item). But in the attached xlate file, %l1 does not point to a list, so when trying to fetch the value of $%l1, it accesses invalid memory and causes the error.

                      The description of the AR explains why the change was made:

                      When using the List iterate in a translate, if you access it using the $ value it returns the index of the value instead of the value. For example if I define a list like: 12 13 14 15 etc. and then look at the $l1 value it returns 0 1 2 3 etc. instead of 12 13 14 etc.

                      I believe this applies to any %lnn variable.

                      - Mark Thompson
                      HealthPartners

                  Viewing 6 reply threads
                  • The forum ‘Cloverleaf’ is closed to new topics and replies.