The system provides default monitoring and handling of any messages you do not monitor.
Many escape messages can be sent to a procedure that calls commands, programs, and procedures. You may want to monitor and handle the escape messages which pertain to the function of your procedure. However, you will not want to monitor and handle all of the messages.
Default handling assumes that an error has been detected in a procedure. If you are debugging the procedure, the message is sent to your display station. You can then enter commands to analyze and correct the error. If you are not debugging the procedure, the system performs a message percolation function.
Message percolation is a two-step function that does the following:
If the procedure has a Monitor Message (MONMSG) command for the escape, the message percolation action stops, and the system takes the action that is specified by the Monitor Message (MONMSG) command. Message percolation continues until either finding a Monitor Message (MONMSG) command, or until finding the nearest control boundary. This means that the escape message does not percolate across control boundaries.
The function check processing begins by finding the control boundary before finding a procedure with a Monitor Message (MONMSG) command which applies to the message. The system considers action on the original escape exception complete. The system then sends the function check message (CPF9999) to the procedure that was the target of the original escape. If that procedure has a Monitor Message (MONMSG) for the function check message, then it takes the action that is specified by that command. Otherwise, the system sends an inquiry message to the workstation operator if the job is an interactive job. The workstation operation can reply with one of the following replies:
The system does not percolate the function check across the control boundary. If any reply causes the function check to move across an activation group boundary, this stops further action on the function check. The system cancels all procedures up to the activation group boundary, and sends the escape message CEE9901 to the prior call stack entry.
You can monitor for function-check escape messages so that you can either:
The following diagram shows how CL monitors for messages and notifies the workstation user of a function check for default handling.