IAR to IAM Iterate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf IAR to IAM Iterate

  • Creator
    Topic
  • #54782
    Tim Purvis
    Participant

      So I need something that will copy all of the IAR.1’s into a single IAM.5 field on the outbound separated by a ~. The IAM and IAR are in a repeating group. The IAM segment doesn’t repeat but the IAR can have multiple instances associated with a single IAM which is where my problem is. I need to be able to pull Abdominal Pain and Rash from the below example and then place in IAM.5 as Abdominal Pain~Rash. I have an Iterate setup on the group and the segment but I am not having any luck. I have banged my head against the wall for a while one this. Does anyone have any experience pulling values from multiple segments and then placing them into one field?

      IAM||DA|8921^Latex^99ING|||X|||||||||||C|K Halley^Halley, Kelly^^^^^^^SOARIAN||201506291029|||||||8921^Latex^99ING

      IAR|^Abdominal pain|MO||

      IAR|^Rash|MO||

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

          Yup – you most likely can simply place the counter for your segment or group (%sx or %gx) in the field repetition position of the address path.

          I emailed you in case you want to discuss this off-line.

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

        • #82972
          Tim Purvis
          Participant

            Jim

            Can you email me at Tpurvis1084@yahoo.com?

          • #82973
            Ryan Hull
            Participant

              I know this very old, but I’m stuck on something similar.  I’ve got a field which can repeat and I’m trying to copy it into ITM-1 which is also a repeating field.  The variants being used both have the repeating option checked.

              I copied over the ZIT-48 content for 1 instance of the field (test message isn’t repeating in this case).  However, I am unfortunately overwriting what is already being copied into ITM-1.  I’d like to put this in the next instance of ITM-1 since it repeats.

              My iteration is:  Type:field  Basis: 0(0).ZIT(0).#48  Variable: %f2

              Then I use:  COPY 0(0).ZIT(0).#48(%f2) –> 1(0).0(0).ITM(0).#1(%f2)

              I’ve tried iterating through the ITM-1 field but since that is an output field I think that’s why it doesn’t work.  Does anyone have a suggestion?  I’ve seen material on the $%g  function, but I’m still unclear on how exactly that works.

            • #82974
              Jim Kosloskey
              Participant

                Ryan,

                email me and I will try to assist.

                Just click the email button on my signature.

                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.