I think SMAT records messages once they have been successfully sent so removing the PDF prior to SMAT means the OB message won’t have the PDF. Not what you want.
One thing you could do is to use an Xlate chain and re-route with another ‘dummy’ thread as the destination that delivers the messages to a dev/nul file (essentially nowhere) and have the SMAT on that thread and not the one delivering to the downstream system.
The Xlate Chain would have the Xlate that builds the message with the pdf followed by another Xlate that SENDS the original message to the downstream system thread and removes the OBX-5 with the PDF and re-routes another message missing the OBX to a new trxID which then routes to the ‘dummy’ thread.
If you are not familiar with either chaining or re-routing, look in the documentation or email me and I will send you technique white papers on chaining and re-routing.
Of course, you could also use Tcl to remove the OBX-5 on a route to the ‘dummy’ thread.
The downside is you really do not have an exact copy of the message sent to the downstream system in SMAT, you have a copy that should be the same sans the OBX-5 with PDF.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.