iterate with Continue and Suppress

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf iterate with Continue and Suppress

  • Creator
    Topic
  • #48778
    Keith McLeod
    Participant

      I have an orm_o01 message that repeats starting at the OID segment.  I am looking at creating multpiple messages from the one.  The first repetition comes out OK.  The second message ends up with a blank PID from first iteration and a few other blank segments and then I get the second iteration to finish the message. Here is sample of second message:

      0(0).MSH(0)  :  >|^~&||BNH||LIS|200607271128||ORM^O01|…< 1(0).0(0).PID(0)  :  >These are Blank< 1(0).2(0).1(0).OBR(0)  :  >These are Blank< 1(0).2(0).1(0).OBR(1)  :  >These are Blank< 1(1).0(0).PID(0)  :  >||…< 1(1).0(0).PV1(0)  :  >|1|…< 1(1).0(0).GT1(0)  :  >|1|…< 1(1).1(0).0(0).IN1(0)  :  >|1|…< 1(1).1(0).0(0).IN2(0)  :  >|||…< 1(1).2(0).1(0).OBR(0)  :  >|1|…< 1(1).2(0).1(0).OBR(1)  :  >|2|…< The last 3 lines of the xlate are: CONTINUE PATHCOPY @null –> 1(%g1)

      SUPPRESS

      Any thoughts or help since I don’t usually have this issue.

    Viewing 0 reply threads
    • Author
      Replies
      • #59653
        Robert Kersemakers
        Participant

          Hi Keith,

          I assume that %g1 is your iteration variable and that you’re using %g1 also in the destination message.

          For example:

          PATHCOPY 1(%g1).0(0).PID -> 1(%g1).0(0).PID

          In the last 3 lines, the ‘message’ is cleared, but the segments are still shown in the next message.

          If you want to make one message per interation of PID, I would not use %g1 in the destination message, but just use ‘0’:

          PATHCOPY 1(%g1).0(0).PID -> 1(0).0(0).PID

          This way you also don’t need to clear the message anymore.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

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