One OBX to multiple OBX using tcl

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf One OBX to multiple OBX using tcl

  • Creator
    Topic
  • #51197
    Gary Atkinson
    Participant

    Usually I would do this in an xlate.  But, in this case I can not, because I have encoded the data before the message enters translation.  Does anyone have a tcl proc that takes each ~ of OBX:5 and creates a OBX segment?  So I get:

    OBX|1|ED|||rtf payload1~rtf payload2 etc etc.

    and create

    OBX|1|ED|||rtf payload1

    OBX|2|ED|||rtf payload2

    thx,Gary

Viewing 2 reply threads
  • Author
    Replies
    • #69165
      Jim Kosloskey
      Participant

      Gary,

      I don’t see why that could not be done in the Xlate.

      Just iterate through the field repetitions, I don’t think the fact that the data of each repeitin is encoded or not should matter.

      email: jim.kosloskey@jim-kosloskey.com

    • #69166
      Gary Atkinson
      Participant

      Doesn’t the ~ get encoded along with other rtf data?

    • #69167
      Jim Kosloskey
      Participant

      Gary,

      Yes if you are encoding the entire field. If you are doing the encoding in Tcl, see if you can just encode each repeition of the field, then you can do the other work in the Xlate.

      Of course if you are going to have to change the Tcl proc anyway, you could just also build the new OBX segments.

      The key issue I think is if the ~ is in the RTF document prior to encoding. That would make parsing an issue – but if the field also contained  a field separator as part of the pre-encoded RTF, that would also present a parsing challenge.

      email: jim.kosloskey@jim-kosloskey.com

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

Forum Statistics

Registered Users
4,966
Forums
28
Topics
9,106
Replies
33,627
Topic Tags
248