Originally posted by Frank Urbanija
I want to change the ^ to & in the OBR 32.1-5. I am able to change all the ^ to & in the OBR segment but can't just change for OBR 32.
here is my current tcl
set msgtext [msgget $mh]
set field_delimiter [cindex $msgtext 3]
foreach segment [split $msgtext "r"] {
if {[cequal [crange $segment 0 2] "OBR"]} {
regsub -all {^} $segment {&} segment
}
if {$segment != ""} {
lappend newmsg $segment }
}
msgset $mh [join $newmsg "r"]
return "{CONTINUE $mh}"
}