I have TCL where I am creating multiple outbound messages from a single inbound message, splitting apart FT1 / ZPA segment pairs into unique outbound messages. The proc seems to work fine for a while, but occasionally it throws an “Invalid MSI index -1” error. When this happens, I find the inbound message is in the recovery db with a message state of ‘5’. I remove it from the recovery db and re-send the same message from SMAT without error. This error only seems to occur when the process it is in is stopped, possibly when this TCL is in the middle of processing a message. Here is a code snippet for the message creation:
set outboundMsg [join $message_out “r”]
set mh2 [msgcreate -type data]
msgmetaset $mh2 DESTCONN $destConn
msgset $mh2 $outboundMsg
lappend dispList “CONTINUE $mh2”
Any suggestions on why this might be erroring out? Out of thousands of messages, it has only errored out in this way about 3 times. I have put it in its own process to mitigate the problem, but would like to eliminate it altogether.
Thanks for any insight anyone may have on this,