How to determine the relevant MONMSG

425 pts.
How to determine the relevant MONMSG to be used with out knowing the exact MONMSG id to be used. Ex: If CHKOBJ command line is there in a CLP, below that we dont know what the monmsg id CPFXXXX to be used, in that case how you find out the exact ID to be used by using the program logic?

Software/Hardware used:

Answer Wiki

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

GO online to the IBM website that has manuals.
Then find the CL manuals and look up the command you want to monitor.
A list will be provided for you.


The <help> for each (IBM) command includes a list of all of the message identifiers that the command might send. Scroll to the bottom of the <help>. Determine which of those you want to monitor for at that moment. If a message ID is sent that you choose not to monitor for, the program’s global error handler will be invoked. If a global MONMSG is not present or does not include the message ID that was sent, then any system default handler will be invoked.

Ranges of message IDs can be monitored: CPF9800 will catch CPF9801, CPF9802, CPF9803, up through CPF98FF; and CPF0000 would catch CPF0001 up through CPFFFFF. That is, by specifying trailing zeros, you are asking for the range of values that can fit within the trailing zero positions.


Discuss This Question: 4  Replies

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.
  • Kar
    No, I'm asking to how to obtain it with out browsing net, only through CLP program.
    425 pointsBadges:
  • Yorkshireman
    You could just use the command prompt. F1 to show help, page down and all CPF messages possible are given to you.
    6,085 pointsBadges:
  • WoodEngineer
    If the command is allowed to run interactively, run it in such a way that an error will be genrerated, then inspect your job log. For example, CHKOBJ OBJ(XXXXXXXXXX) OBJTYPE(*FILE) will display this error: "Object XXXXXXXXXX in library *LIBL not found." Move your cursor to the error message and press F1 to see the message ID which is CPF9801 in this case. Remember that you can not monitor for completion or diagnostic messages. By the way, to see all the error messages a command can generate, enter the command and press F4, then move your cursor to the top of the display and press F1. This displays all the help text for the command. This will reveal the error messages mentioned in other posts.
    8,225 pointsBadges:
  • Splat
    Pace Yorkshireman, if you use F1 on the prompted command, you'll need to use F2=Extended help once the Help window is displayed then scroll to the bottom to get the list of messages.
    12,915 pointsBadges:

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.

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


Share this item with your network: