Sequence Number

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Sequence Number

  • Creator
    Topic
  • #51590
    Steven Lindsey
    Participant

      I have deleted a segment in Xlate and in my GT1_1 the sequence number is not starting at 1 once I delete the segment out.  How do I fix this?  

      I do not always delete the GT1 segment just giving you a heads up.

      Here are some screen shots.

      Thanks

    Viewing 11 reply threads
    • Author
      Replies
      • #70881
        Robert Kersemakers
        Participant

          Hi Steven,

          You will need to keep track of the sequence number yourself if you’re deleting GT1 segments. Initialize a counter @GT1_counter before your iteration

          Code:

          COPY =0 -> @GT1_COUNTER


          Then inside your iteration, you will decide if you’re going to delete this GT1 segment.

          If you do so, you don’t need to do a thing. If you don’t you will have to fill GT1-1 with @GT1_counter and then increase your counter:

          Code:

          COPY @GT1_counter -> 1(0).GT1.00405.[0]
          MATH ADD @GT1_counter =1 -> GT1_counter

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #70882
          Steven Lindsey
          Participant

            Thanks Robert,

            I’m still getting an error.  Here is a screen shot of my Xlate and the error.

            Thanks,

            Steven

          • #70883
            Russ Ross
            Participant

              GT1_counter is a temp variable and needs an @ in front of it each time you reference it.

              It looks to me like you are missing an @ in one of your references in your MATH statement to increment the @GT1_counter.

              Russ Ross
              RussRoss318@gmail.com

            • #70884
              Steven Lindsey
              Participant

                Thanks Russ

                It works.  Thanks for everyones help.

              • #70885
                Steven Lindsey
                Participant

                  Ok, I’m still having a small issue.  It keeps picking up the GT1 that i nulled out.  Here is my xlate and what it keeps doing.  Can anyone hlep with this.  As you can see it keeps putting the 1 in the null GT1.  I have moved all these areound trying to get this to work and have had no luck.

                  Thanks,

                  Steven

                • #70886
                  Robert Kersemakers
                  Participant

                    You null out the GT1 segment inside your IF-statement, but then you fill the index with @GT1_counter. You need to move the last two statements (COPY and MATH ADD) out of the IF, by moving them upwards a couple of places.

                    Personally, I would check whether GT1.00414 is not equal ‘I’. If so: PATHCOPY the GT1 segment,  fill GT1-index with @GT1_counter and then increase @GT1_counter. Now you are PATHCOPYing and afterwards nulling out the segment again. Waste of (processor) time, how small it may be.

                    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                  • #70887
                    Steven Lindsey
                    Participant

                      I think I did what you told me to and I’m still having the same problem.  Here are some screen shoots of the Xlate and Results.  It keeps filling out the GT1 that should not be coming across.

                    • #70888
                      Robert Kersemakers
                      Participant

                        You are mixing up things!

                        The way you did it now (IF GT1.00414 ne =I and then PATHCOPY), you will need to move the two COPY and MATH ADD statements back inside the IF statement (following the PATHCOPY). It should work then!

                        Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                      • #70889
                        Steven Lindsey
                        Participant

                          Ok, I think I got it the way you said but I did that before but I guess the reason I didn’t keep that way was because of this error I get.  I don

                        • #70890
                          Robert Kersemakers
                          Participant

                            Hmmm. Not sure what this error means.

                            Searching this forum revealed this thread: https://usspvlclovertch2.infor.com/viewtopic.php?t=1464&highlight=vsidest

                            Can’t help you there…

                            Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                          • #70891
                            Vince Angulo
                            Participant

                              We’ve had that error before on 5.2 (fixed in 5.4Rev1 and later).

                              It occured when we were trying to skip iterations of NK1 or DG1 (like you’re doing with the GT1) and using PATHCOPY.

                            • #70892
                              Steven Lindsey
                              Participant

                                I got it to work.  The pathcopy was causing me the issue and once I switched it to copy it all started to work.  Thanks for everyone

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