Command to display description of error message

30 pts.
Tags:
iSeries programming commands
RPGLE
Hi, I want to know the command to display the description of error messages. Please clear my doubt.

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Sloopy
    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: http://www.geocities.com/alex_nubla/tips.htm 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.
    2,195 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following