XLate OBX Segments

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf XLate OBX Segments

  • Creator
    Topic
  • #50718
    Marcus de Leon
    Participant

      Hi,

      I was wondering if anybody can tell me if it’s possible to do the following:

      I am using XLate and iterating through each OBX Segment in an MDM_T02 message. If I find an empty OBX 5, I need to append text to the previous OBX line. What is the best way to do this?

      Thanks,

      Marcus de Leon

    Viewing 1 reply thread
    • Author
      Replies
      • #67231
        Jim Kosloskey
        Participant

          Marcus,

          Wehn you detect the condition that tells you to do what you need to do, set you owntiteration counter to the current iteration counter for the OBX minus one (MATH Subtract Action) and use your own iteration counter to append the current OBX to the previous OBX.

          So lets say the iteration counter from the ITERATE is %g1 and you are going to use %g99 as your won iteration counter:

          Inside the iteration you will have an IF; inside that IF you will have:

          MATH SUB

          $%g1

          =1                   $%g99

          CONCAT

          ~…(%g99).OBX.#5

          …(%g1).OBX.#5              …(%g99).OBX.#5

          Note in the above the $ (dollar sign) in front of the %g1 and %g99 fields in the MATH.

          Also in the CONCAT note the ~ (tilde) in front of the first OBX.#5 that indicates this is the outbound field (selected fromt the outbound tree in the Xlate and depresseing the Copy to inbound or source button).

          You did not say if you want to keep the latter OBX that is appended to the former so the above asume the latter OBX is kept.

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

        • #67232
          Marcus de Leon
          Participant

            Thanks! That’s excellent. I didn’t know how to reference the counter via $. This helps a lot!

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