
AFAIK, you can’t.
If you are creating the message text, you can embed display color attributes in the message.
However, this doesn’t apply to messages sent to *MSGQs that are displayed with DSPMSG functions. It only applies to display file message displays. So, for example, you couldn’t expect colored messages to show as colored in the QSYSOPR message queue display or in a workstation message display. Undisplayable characters are automatically replaced with x’3F’. Otherwise unpredictable effects would happen from programs with bugs sending messages (or even programs manipulating display attributes on purpose).
But you could use a SNDPGMMSG function to send a *STATUS message out to a display file message subfile and see the appropriate color.
Tom
















