Sheila

Forum Replies Created

Viewing 3 replies – 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: OBX-5 Help with Tilde “~” removal/replacement \.br\ #119288
    Sheila
    Participant

      I was able to resolve the issue by doing a COPY of @null -> @obx5.  Then CONCAT “\.br\ ” to the OBX5 within an ITERATE.  This got rid of the ~’s (tildes) and placed “\.br\ ” to the end of each subsegment.

      After the iterate, I COPY’d the variable to the OB OBX-5 and Tcl’d Trimmed Right:

      lassign $xlateInVals obx
      set obx [string trimright $obx “\\.br\ “]
      set xlateOutVals [ list $obx ]

      This was exactly what I needed.

      Attachments:
      You must be logged in to view attached files.
      in reply to: OBX-5 Help with Tilde “~” removal/replacement \.br\ #119286
      Sheila
      Participant

        Ok so the goal is to take OBX-5 (see example below):

        |test1~test2~test3 test4 test5~test6 test7|

        And make it look like this:

        |test1\.br\ test2\.br\ test3 test4 test5\.br\ test6 test7|

        My approach is 3 parts.

        PART 1 – Add “\.br\ ” to the end of each segment even the last one.  I have completed this part successfully.  I was able to iterate through and copy IB OBX-5 to OB OBX-5.  and I used a Pre Proc Tcl:

        set abc [lindex $xlateInVals 0 ]
        set de “\\.br\\ ”
        set out [concat $abc$de]
        set xlateOutVals [ list $out ]

        Result is:  |test1\.br\ ~test2\.br\ ~test3 test4 test5\.br\ ~test6 test7\.br\ |

        PART 2 – Which is where I am stuck.   So the goal here is to remove the Tildes “~” from OBX-5.  So I am taking the results of PART 1 to produce the following:

        |test1\.br\ test2\.br\ test3 test4 test5\.br\ test6 test7\.br\ |

        I have tried to do a second iterate on that field to concat the elements but in all my efforts it seems to only read the first or last one.

        PART 3 – Would be to remove the last “\.br\ ” from the field.  I plan to trim Right “\.br\ ” which I think will be fine if I could just get passed PART 2.

         

        in reply to: OBX-5 Help with Tilde “~” removal/replacement \.br\ #119284
        Sheila
        Participant

          We are running 10.16.  The issue I am having is that it is only reading the first element.   So only test1 is read in. What I need to figure out is how to set a variable to the number of subsegments.  where that value can change from one message to another…

          Then I might be able to loop through to concat or append….

          |test1~test2~test3 test4 test5~test6 test7|

        Viewing 3 replies – 1 through 3 (of 3 total)