Ü   MONMSG / Difference between cpf0000 and cpf9999 in as400



Before we go for the difference between CPF0000 and CPF9999, we need to understand how the MONMSG works.

First, we can monitor for a specific message, e.g.

    MONMSG    MSGID (CPF9821)


Or we can monitor for a list of messages, e.g.

    MONMSG    MSGID (CPF9821 CPF9822 ……  CPF9830)


Now if we want to catch all the messages that start with CPF98.., then we can go for the below MONMSG:



Now if we want to catch all the possible generic messages for CPF…., we can use the below MONMSG:



To have more generic message monitor, we can go for:



But now suppose we have given the generic message handling MONMSG command as above, but the program generates a message that is not in this generic list of messages then that will not be handled.

That unhandled message is converted into CPF9999 by our system automatically.

Hence, all the unhandled messages are converted to CPF9999, which actually is being handled by our generic MOMSG command.



Suppose there is any program which needs parameter value (file name) to be passed, but actually we are not passing the value in this case. In the program when we try to delete the file then what we get  an error CPD0071.

Hence, here this unhandled exception is converted to CPF9999 and then it is handled via CPF0000(GENERIC MSG HANDLER).




User Comments:

Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy