IF that is what is wanted just be aware this could likely be done without Tcl – for those who are not Tcl proficient.
Not a lot has been revealed regarding the termination characteristics of each message/record in the file.
However, if that termination characteristic can be specified in the FileSet Style, then the FileSet protocol will extract each message/record from the file and present it to the engine.
Then route as normal. Inside the route using an Xlate:
Check the specific fields for qualification (using IF Actions).
If the condition is such that the message should be discarded, SUPPRESS the message otherwise process the message using appropriate Xlate Actions.
If a qualifying message is to produce multiple outbound messages follow the directions I specified above.
If the style cannot specify the termination characteristics, then some Tcl could be constructed to present each message/record to the engine. But the qualification, transformation, and creation of multiple messages from one could still be accomplished as described.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.