Saving a message from a user's message queue
ISeries expert Ken Graap explains how to save a message from a user's message queue by using the DSPMSG command or writing an exit program.
DSPMSG MSGQ(CRITMSG) OUTPUT(*PRTWRAP)
However, user message queues can be easily cleared by users via the F11, F13 and F16 function keys, so the messages you are trying to capture may be deleted before you can capture them with DSPMSG.
You may want to explore writing exit programs for the SNDMSG, SNDBRKMSG, SNDUSRMSG, SNDNETMSG, etc.
The exit program would be executed before the command, allowing you to capture a user's message and send it anywhere you want.
You can find more information on writing exit programs here.