Using the IGNORE CONDITION command
You can use the IGNORE CONDITION command to specify that a program continues when a specific condition occurs (in contrast to the HANDLE CONDITION command, which specifies that control passes to a specified label when a specific condition occurs).
About this task
EXEC CICS IGNORE CONDITION MAPFAIL
END-EXEC.
When a single EXEC CICS command is processed, it might raise several conditions. For example, a file control command might be invalid and might also apply to a file that is not defined in the file control table. CICS® checks these conditions and passes the first one that is not ignored (by your IGNORE CONDITION command) back to your application program. CICS passes back only one exception condition at a time to your application program.
An IGNORE CONDITION command for a given condition applies only to the program you put it in. It remains active while the program is running, or until a later HANDLE CONDITION command that names the same condition is met, in which case the IGNORE CONDITION command is overridden.
You can use an IGNORE CONDITION command for a program that reads records that might be longer than the space you provided, but you do not consider this as an error and do not want anything done about it. You might, therefore, code IGNORE CONDITION LENGERR before issuing READ commands.
You can also use an IGNORE CONDITION ERROR command to catch any condition considered as an error for which there is no currently active HANDLE CONDITION command that includes a label. When an error occurs, control is passed to the next statement and the program must check for return codes in the EIB. See How CICS keeps track of what to do for examples of conditions that are not considered as errors.
* MIXED ERROR PROCESSING
EXEC CICS IGNORE CONDITION LENGERR
END-EXEC.
EXEC CICS HANDLE CONDITION DUPREC(DUPRTN)
LENGERR
ERROR(ERRHANDL)
END-EXEC.
Because this code initially ignores condition LENGERR, nothing happens if the program raises a LENGERR condition; the application continues its processing. Of course, if the fact that LENGERR has arisen means that the application cannot sensibly continue, you have a problem.
Later in the code, you can explicitly set condition LENGERR to the system default action by naming it in a HANDLE CONDITION command without a label. When this command has been executed, the program no longer ignores condition LENGERR, and if it subsequently occurs, it now causes the system default action. The point about mixing methods is that you can, and that each condition is treated separately.
You cannot code more than 16 conditions in the same command. You must specify any additional conditions in further IGNORE CONDITION commands.