You asked how to do this in Tcl. I assumed, depending on where and how you are processing the flat file, you would know how to access the message.
If you put a tcl script in your inbound thread you would simply add this as part of the script. To be more specific I would have to know how you are reading the flat file. Are you reading a record at a time or is it coming in as a complete file? Do you then forward through the engine as a single file or as multiple records?