Question

  Asked: Jun 10 2008   10:32 AM GMT
  Asked by: Babs


error message


RPGLE, iSeries programming commands

Hai, i want to know the command to dispaly the description of error messages.pls clear my doubt..

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



The command is ? WRKMSGD MSGID(X) MSGF(QCPFMSG). You provide the message ID in place of "X". Most common messages will exist in the message file QCPFMSG (Those that begin with CPF* & MCH*).

If you can't find it there, search for an *MSGF object (DSPOBJD) that starts with the Qxxx where "xxx" is the first three characters of the message id. That seems to be the pattern IBM has been following for their message IDs.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Sloopy  |   Jun 10 2008  3:37PM GMT

WRKMSGD will show you a list of the messages starting from the message ID you enter on the command, or *FIRST. The default message file is QCPFMSG.

You can also use DSPMSGD, for example:

dspmsgd CPF019A

- will show you ONLY the details of the message CPF019A from QCPFMSG, and:

DSPMSGD RANGE(ERR1015) MSGF(TTSMSGS)

- will show you details of the application error message ERR1015 from application message file TTSMSGS in the library list.

Unfortunately, there is no search facility provided by IBM, so you can’t easily search the message TEXT to find a message when you don’t know the message ID. But many people (myself included) have written utilities to do that, and if you need such a utility you may well find one as freeware.

Failing that, you can output the DSPMSGD command to *PRINT and search the spooled file.

A good place to look for free iSeries utilities (but not search message file) is:

<a href="http://www.geocities.com/alex_nubla/tips.htm" rel="nofollow">http://www.geocities.com/alex_nubla/tips.htm</a>

Regards,

Sloopy

PS: It has just occurred to me that perhaps you are asking how to display the error message text from within a program - if this is what you are after, please respond and restate your question, and then we can answer that.