Problem solve Get help with specific problems with your technologies, process and projects.

Find a message ID based on the message text

Here's a way to find the message ID based on the message text.

Ever want to use an existing message in a message file and try to find the message ID based on the message text? Here's how to do it.

Code: Make sure your default outq is not started to a writer.

Issue the following command:

DSPMSGD RANGE(*ALL) MSGF(XXXLIB/XXXMSGF) OUTPUT(*PRINT) 

Locate the spool file:
Device or Opt File User Queue 5 QPMSGD

Use the spool file scan function to find text in the message and identify the message ID.


Dig Deeper on iSeries ILE programming

SearchDataCenter

Close