Iteration Problem: Post Variable outside of loop

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iteration Problem: Post Variable outside of loop

  • Creator
    Topic
  • #54222
    Gordon Koch
    Participant

      Hello All,

         I have a problem that I hope someone has solved already. I need to populate the value in the field of one OBX iteration across all the OBX iterations if present. In the Xlate, I am interrogating if OBX.5 contains a certain value and then capturing this value in a variable. When present, I need to populate this value across all OBX iterations in another field (OBX.8).

      Right now, I can just populate OBX.8 of the OBX segment that contains the value, not the other OBX segments. Basically I cannot escape the interation loop of the segment in question.

      Any suggestions??

      Thanks.

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

          Gordon,

          ITERATE twice over the OBX. The first time to discover if the value exists and set the temp variable.

          In the second ITERATE check of that temp variable is not null and act accordingly.

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

        • #80630
          Gordon Koch
          Participant

            Hello Jim,

               Thanks for the input. Are the Basis values for the two iterates the same? I am not sure how the variable is carried over to the second iterate.

            Thanks.

          • #80631
            Jim Kosloskey
            Participant

              Same basis. If you feel more comfortable using a different counter that is fine but not necessary as each ITERATE treats its counter separately.

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

            • #80632
              Gordon Koch
              Participant

                Hello Jim,

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