Iteration Help

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iteration Help

  • Creator
    Topic
  • #52927
    Kevin Crist
    Participant

      I am having a difficult time getting the FT1 segment to repeat. Done this many times before with no trouble so i’m not real sure what i have screwed up. My xlate code, basis and variant are in attached doc. Also i am using same variant IB and OB.

      Thanks for any help.

    Viewing 9 reply threads
    • Author
      Replies
      • #75955
        Jim Kosloskey
        Participant

          Kevin,

          I don’t think your basis is correct (did you use the ‘Copy to Basis’ button on the Inbound tree to set it?

          Thus if your basis is not correct, then your placement of the repetition variable is not correct in the PATHCOPY Address pathing.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #75956
          Keith McLeod
          Participant

            Are you iterating on a group or segment or both?  Looks like a group with a repeating segment.

          • #75957
            Kevin Crist
            Participant

              Im not real sure why but i took the 1(%g1).0(0).FT1(0) and took off the ending (0) and it works now.

            • #75958
              Keith McLeod
              Participant

                Also sometimes I find I need to remove the (0) after the segment name of FT1 if you just want to copy all segments.

                Pathcopy 1(%g1).0(0).FT1 –> 1(%g1).0(0).FT1

                If the segment repetition falls at the parentheses after FT1, then technically you would only copy the first repetition with

                1(%g1).0(0).FT1(0) as your path.

              • #75959
                Kevin Crist
                Participant

                  Thanks for the help and suggestions. Very much appreciated.

                • #75960
                  Keith McLeod
                  Participant

                    I guess that answers it…

                  • #75961
                    Kevin Crist
                    Participant

                      i have to add some more changes this to xlate and i am having trouble again with the Iterate. I originally had trouble getting the FT1 to iterate but i took off the end and it worked. Now i am having trouble adding code to all the iterations of the segments. Any ideas.

                      Thanks.

                    • #75962
                      Keith McLeod
                      Participant

                        You will need another iteration but this time use the ft1 segment.

                      • #75963
                        Kevin Crist
                        Participant

                          It is a repeating FT1 segment. it’s a DFT^P03 message for version 2.3.1.

                        • #75964
                          Keith McLeod
                          Participant

                            With the 2.3.1 variant and no modifications, I show the DFT_P03 message to have the FT1 segment as part of a repeating group.

                            The iterate for the ft1 statement would be

                            Group

                            Basis 1

                            variable %g1

                            Iterate

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