Adding OBX TCL

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Adding OBX TCL

  • Creator
    Topic
  • #53723
    tyler tesson
    Participant

      I am trying to add OBX segment:

      OBX||TX|For complete report click on link below|1||

      The segment needs to go after the last OBX segment. This is what I have so far, but the code is not inserting in the OBX seg I am trying to add:

      proc tps_prosolv_oru_tyler { args } {

         global HciConnName

         set mode [keylget args MODE]

         switch -exact — $mode {

             start {

                 return “”

             }

             run {

                 set mh [keylget args MSGID]

       set dispList

                   set vars [keylget args ARGS]

                   set msg [msgget $mh]

                   set fldSep [string index $msg 3]

                   set subSep [string index $msg 4]

                   set repChr [string index $msg 5]

                   set segList [split $msg r]

                      set newOBX {OBX||TX|For complete report click on link below|1||}

        set OBXloc [lsearch -all -regexp $segList {^OBX}]

        set lastLoc [lindex $OBXloc end]

        incr lastLoc

        puts “this is lastLoc: $lastLoc”

        echo newOBX: $newOBX

        set $segList [linsert $segList $lastLoc $newOBX]

        echo seglist $segList

                   

                   

                   set msg [join $segList r]

                   puts $msg

         msgset $mh $msg

                   return $dispList

               }

           }

           shutdown {

               return “”

           }

        }

    Viewing 0 reply threads
    • Author
      Replies
      • #78728
        bill bearden
        Participant

          The

           set $segList [linsert $segList $lastLoc $newOBX]

          should probably be

           set segList [linsert $segList $lastLoc $newOBX]

          The “$” might be the issue.

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