CBORD orders can come in multiple messages. The engine writes the first message to a file and then when the message with the completion code arrives, the file is read and the messages are assembled into one message. This has been working fine since long before I became “the interface guy.”
Now, during testing the new server, while ADTs pass through the system just fine, orders are being NAK’d by CBORD. The orders now have x0a between segments instead of x0d. I can only guess that being retrieved from a file is causing this character to change.
I thought maybe a tcl proc could change all the x0a to x0d and so I wrote this (I’m just showing a fragment here) proc would work. I’m not much of a tcl programmer, but I thought it would work. It doesn’t.
run {
keylget args MSGID mh ;# Fetch the MSGID
set msg [msgget $mh] ;# Get the Message Handle
echo <<<< Converting all hex A to hex D >>>>
regsub -all { xa} $msg xd msg
msgset $mh $msg
lappend dispList “CONTINUE $mh”
}
Any ideas on where I’m going wrong? Is there a better way to solve this problem?
Thanks for any help!