
command level message for specific message to occur during the execution of single command, here you specific that error id if you know that…
CPF0000 & CPF9999, it will trap all errors in the program. A program-level MONMSG is placed after declaration statements.

You are not limited to CPF0000 & CPF9999 at the program level. You can monitor for any message at the program level.
Hope this helps,
Bill Poulin

Whats the purpose of differenciate the monmsg in two types…? I mean if we trap the error at pgm level then why I use command level monmsg? is there any difference?
There are two Types of MONMSG, Program level and Command level. If you are using Program level MONMSG than you can trap error and Handle it, Here you can use GOTO Statement only. Where as if you want to perform some action or use any command at the time of error than you use command level MONMSG. That is the difference.

Thanks Builtin














