Originally posted by tyler tesson
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 lastLocputs "this is lastLoc: $lastLoc"echo newOBX: $newOBXset $segList [linsert $segList $lastLoc $newOBX]echo seglist $segList set msg [join $segList r] puts $msg msgset $mh $msg return $dispList } } shutdown { return "" }}