Creating New OBX Segments from OBX-5

Homepage Clovertech Forums Cloverleaf Creating New OBX Segments from OBX-5

  • Creator
    Topic
  • #118058
    Lonnie Davis
    Participant

    Since I can’t reply to an archived 3 year old thread, I’m making a new one.  I need to create new OBX segments from a single OBX segment where OBX-5 contains \.br\ in a translation.

    What I need to do is exactly the same as in this old thread.

    http://clovertech.infor.com/forums/topic/creating-new-segments-from-within-xlate/

    In the thread, Jim Koslosky states:

    “If inside the Xlate then you will need to split the NTE-3 on .br creating a list (if 6.1.0 or later you can use the STRING Action with the appropriate function).

    Then you will need some tcl to pop each element of the list. This would be inside a LIST ITERATE which needs to be controlled. Most of the above stuff for building the NTE segments will be the same except the ITERATE Counter will be %l1 but the OB counter will still be %s99 but the source will be the list created by the split.”

    Can someone (or Jim if you see this) provide a screenshot or example of what the output list of splitting on .br would look like and how to iterate a list and “pop each element of the list?

    • This topic was modified 3 years, 11 months ago by Lonnie Davis.
Viewing 1 reply thread
  • Author
    Replies
    • #118060
      Jim Kosloskey
      Participant

      If you email me I will try to assist you with this – tomorrow at the earlest.

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

    • #118065
      Lonnie Davis
      Participant

      After working with Jim on several different ways to accomplish this task, I decided to go with chaining xlates for its simplicity.

      Xlate #1 does a pathcopy on all of the segments of the MDM^T02 message which do not need modification.  It also uses the String action to map the \.br\ to a ~ (tilde) in OBX-5.

      Xlate #2 then does another pathcopy on the same segments that don’t need to be changed, and performs an iterate on the OBX-5, now as a repeating field, to create the OBX segments.

      Attached are the screenshots of the xlate actions from both to illustrate what is going on.

      A big thanks to Jim for taking the time to work with me on Friday to get this done!

      Attachments:
      You must be logged in to view attached files.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10