Iteration question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iteration question

  • Creator
    Topic
  • #50624
    Manny Zachodin
    Participant

      How do I specify the parameters of two ITERATE’s for the following  X12-837 message: ( know how to do the 4(%g2))

      2(0).2(0).4(0).0(0).sv2(0)

      2(1).2(0).4(0).0(0).sv2(0)

      2(1).2(0).4(1).0(0).sv2(0)

      2(1).2(0).4(2).0(0).sv2(0)

      2(2).2(0).4(0).0(0).sv2(0)

      2(2).2(0).4(1).0(0).sv2(0)

      2(2).2(0).4(2).0(0).sv2(0)

      Thank you for your prompt advice!

    Viewing 3 reply threads
    • Author
      Replies
      • #66817
        Jim Kosloskey
        Participant

          Manny,

          You will need to use nested iterations.

          The first iteration will be at the

          2(0).2(0).4(0).0(0).sv2(0) loop

          Within that iteration you will have another iterate at the

          2(0).2(0).4(0).0(0).sv2(0) loop.

          You may also need another iteration in the intervening loop but your data does not show that.

          Make sure to use the counter from the first iteration in the basis definition of the second iteration.

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

        • #66818
          Manny Zachodin
          Participant

            JIm. Thank you for your guidance.  I am still puzzled about the number I need to put as the basis for this example:

            2(1).1(0)…….

            2(2).1(0)…….

            2(3).1(0)…….

            Action:  ITERATE

            Type: Group

            Basis: ???????

            Variable: %g1

            Thaks again.

          • #66819
            Robert Milfajt
            Participant

              For this example the basis would be: 2

              For the next group it would be: 2(%g1).1

              And so on…

              Hope this helps,

              Robert Milfajt
              Northwestern Medicine
              Chicago, IL

            • #66820
              Jim Kosloskey
              Participant

                Manny,

                If you select the group from the Inbound pane in your ITERATE Action properties, you should see the ‘Copy to Basis’ button (Ithink its {…}) activated as well as see the basis for that position below.

                If you click on the ‘Copy to Basis’ button Your Basis in the ITERATE will be populated. Just make sure you position yourself at the correct place in the inbound.

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

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