When the ADT comes into the engine it has one x0d at the end of the message (found through turning up engine debug log).
I have put echo statements in my tclproc to find out more and discovered that when I split the inbound ADT message on /r, I get an extra element in my list at the end that is {}. This “segment” at the very end and completely empty (null maybe?). There is no actual segment beyond the ZAD at the end. Generally, the tclproc split creates this:
{MSH|||||||} {EVN||||} {PID||||} …. {IN1|||} {IN2|||} {ZAD|||} {}
and after it rebulids the message the split shows us this generally:
{MSH|||||||} {EVN||||} {PID||||} …. {IN1|||} {IN2|||} {ZAD|||} {} {}
How can I keep this from happening in my tclproc? Is there a null character doing this?
Thank you!