Go to the iSeries Information Center on the IBM web site and look at an API program named QMHSNDM. This works similar to the SNDPGMMSG command as it allows you to send a message to a user or other message queue. It will pass a plain text message or a message ID with message data passed to it. This API program can be called from an RPG program.
To my knowledge, there’s no RPG op-code that would do what you want.
But it shouldn’t be any problem using QCMDEXC. Or a low-tech solution would be to simply pass the message text in a parameter call to a CL program…and let the CL program send the message.