Summary -

In this topic, we described about the Handle Condition with detailed example.

Handles the specified conditions. HANDLE CONDITION command used to specify the control passing label or paragraph if a specified condition occurs.

The HANDLE CONDITION command must be executed before the command that might result the condition occurs. User can code up to 16 conditions in the single HANDLE CONDITION.

The conditions must be separated by at least one space. Any additional conditions can be specified in further HANDLE CONDITION commands.

If a condition occurs that is not specified in a HANDLE CONDITION command, the default action is taken. The HANDLE CONDITION command applies only to the program in which it is specified.

If an IGNORE CONDITION command for the same condition is coded, then HANDLE CONDITION command is overridden. If another HANDLE CONDITION command for the same condition is coded, then new command overrides the previous one.

If a LINK command is executed to call another CICS program, then HANDLE CONDITION options are not inherited to the called program. The HANDLE CONDITION command can be temporarily deactivated by the NOHANDLE or RESP option on a command.

Syntax -

HANDLE CONDITION condition (label)

condition(label) -

Specifies the name of the condition. label specifies the label name or paragraph name in the program to where the control should transfer if the condition occurs.