Originally posted by Brian Mertens
Hi Everyone -
I'm trying to write out a proc to dynamically write to a given file, that file being dependent on the value of a given field (in this case, RXA-11.1). Essentially, the logic would be: IF RXA-11.1 eq a||b||c|| then open file 1; ELSE open file 2.
the code that I've written so far will parse out the message and isolate the value of RXA-11.1, but I'm having trouble scripting out the conditional logic for which file to open. Here's the existing code from the run section:
keylget args MSGID mh
set msg [msgget $mh]
set fieldSep [string index $msg 3]
set subSep [string index $msg 4]
set segList [split $msg r]
set segment [lsearch -inline -regexp $segList ^RXA]
set fieldList [split $segment $fieldSep]
set rxa_11 [lindex $fieldList 11]
set subFieldList [split $rxa_11 $subSep]
set rxa_11_1 [lindex $subFieldList 0]
lappend dispList "CONTINUE $mh"
any input would be appreciated, thanks in advance!
-Brian