Which is a type of Monmsg in CL?

The MONMSG command can be coded following most commands in a CL program or ILE CL procedure. A MONMSG command that is not placed at the beginning of the program applies only to the immediately preceding command; this is called a command-level MONMSG command.

What is the main use of Monmsg in as400?

MONMSG Introduction-Go4As400.com. The monitor message (MONMSG) command monitors for the escape/status/notification messages that exist in a program at run time and allows us to take the corrective action for those messages. The messages are sent to the program message queue for the conditions specified in the command.

What is CPF0000?

ppp0000. Monitors for every message with a generic message identifier that begins with a specific licensed program ( ppp ). For example, CPF0000 indicates that all notify, status, and escape messages beginning with CPF are monitored.

How do you read a file in CL program?

First, you need to declare the file to the CL program, using the Declare File (DCLF) command. Don’t bother with any parameters except FILE. Then, issue a Receive File (RCVF) command within a loop. After the RCVF, be sure to monitor for CPF0864 (type *ESCAPE), which is sent at end of file.

What is CPF9999 in as400?

CPF9999 is a specific error message. It just happens to be the message that describes what happens when you don’t trap the error with a MONMSG(CPF0000). So, you’re capturing the error that says you’re program has failed, instead of capturing the error that caused the failure.

How do error codes work with the monmsg?

CPD8981 and CPF2204 set specific error codes. If a specific error code is set, the program returns it. Otherwise, the code drops through to the OTHERERROR section to return the generic error message. I think this really shows off the capabilities of the MONMSG.

What is monmsg in clustercl?

CL has a special opcode called MONMSG. MONMSG is so cool that it has two distinct operating modes. One mode is when a MONMSG is placed after another command. If you put a MONMSG directly after a command, it can check for any errors and execute more commands.

How to check if condition exists in monmsg?

If condition exists, the CL command specified on the MONMSG command runs. · It doesn’t handle diagnostic messages but we can receive those messages from the message queue to get additional information related to the error.

What is monmsg command in Linux?

Ü MONMSG. · The monitor message (MONMSG) command monitors for the escape/status/notification messages that exist in a program at run time and allows us to take the corrective action for those messages. · The messages are sent to the program message queue for the conditions specified in the command.