130 pts.
 Monmsg
Hi, 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?
ASKED: Jan 30, 2012  8:06 AM GMT
UPDATED: February 28, 2012  10:46:32 AM GMT
3,355 pts.

Answer Wiki:
Two Types??
I believe you have mentioned only about one type. i.e., using MONMSG only.

MONMSG Command is used for error handling.
As you mentioned, In Writing the CL Program it self, We are handling the possible error scenarios using MONMSG command.

If you are not talking about using MONMSG in CL Program(as you mentioned Command level MONMSG), Give us the scenario.

Pradeep.
Last Wiki Answer Submitted:  Jan 30, 2012  10:51 AM (GMT)  by  Deepu9321   3,355 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

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.

 3,665 pts.

 

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

 2,470 pts.

 

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.

 100 pts.

 

Thanks Builtin

 130 pts.