You could build a UPoC protocol handler that manages thread status and “writing” messages to the printer. But, almost any “user point of control” or “TPS” in almost any protocol thread could do the work.
For example, it might be easiest to make a file thread that writes to /dev/null and calls your print routine from the outbound data proc.
Found an example in the scripts area:
https://usspvlclovertch2.infor.com/viewtopic.php?t=179” class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=179
Either way, more error checking might be good: If the print command fails, you could send a copy of the message to the ERROR database. Alternatively, you could KILL successfully printed messages and continue any failed ones to a file or other thread. There are almost too many options.