proc merge_A02 { args } {
global A02_save A02_svmsg
keylget args MODE mode ;# Fetch mode
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
set A02_save 0;set A02_svmsg “”
return “”
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
set message [msgget $mh]
set evn4 [ getField “$message” EVN 4 0]
if { ![regexp {A02} $message] } {
return “{CONTINUE $mh}”
}
if { [cequal $evn4 “SWAP”] } {
if {$A02_save} {
And here is the error:
can’t read “A02_save”: no such variable
while executing
“if {$A02_save} {
Thanks,
Kenadi Moore
OhioHealth