HANDLE CONDITION
Handles conditions.
Syntax
Description
HANDLE CONDITION specifies the processing that is to be performed when a named condition occurs.
For a list of all the conditions that can occur during the execution of CICS® commands, see CICS conditions.
If you omit label, any HANDLE CONDITION that is in effect for that condition is deactivated, and the default action for the condition is taken if the condition occurs.
No more than 16 conditions are allowed in the same HANDLE CONDITION command; you must specify additional conditions in further commands.
You must ensure that the HANDLE CONDITION command is executed before the command that might cause the associated condition. Note that the HANDLE CONDITION command for a given condition applies only to the program in which it is specified.
- Remains active while the program is running, or until:
- An IGNORE CONDITION command for the same condition is encountered, in which case the HANDLE CONDITION command is overridden.
- Another HANDLE CONDITION command for the same condition is encountered, in which case the new command overrides the previous one.
- Is temporarily deactivated by the NOHANDLE or RESP option on a command.
- Is suspended by a PUSH HANDLE command until a corresponding POP HANDLE is encountered at the same link level.
If a condition occurs that was not specified in a HANDLE CONDITION or IGNORE CONDITION command, the default action for the condition is taken, unless that action is to terminate the task abnormally, in which case the ERROR condition occurs. If the ERROR condition was specified in a HANDLE CONDITION or IGNORE CONDITION command, the action (possibly none) for ERROR is taken.
You can use the ERROR condition in a HANDLE CONDITION list to specify that all other conditions pass control to the same label.
Options
- condition(label)
- Specifies the name of the condition; label specifies the program label to which control is to be passed if the condition occurs.
- ALLOCERR
- CBIDERR
- CCERROR
- DSIDERR
- DSSTAT
- ENDINPT
- EOC
- EODS
- EOF
- FUNCERR
- IGREQCD
- IGREQID
- INBFMH
- INVERRTERM
- INVEXITREQ
- INVLDC
- INVPARTN
- INVPARTNSET
- INVTSREQ
- MAPERROR
- NAMEERROR
- NODEIDERR
- NONVAL
- NOPASSBKRD
- NOPASSBKWR
- NOSPOOL
- NOSTART
- OPENERR
- OVERFLOW
- PARTNFAIL
- RDATT
- RETPAGE
- RTEFAIL
- RTESOME
- SELNERR
- SESSBUSY
- SESSIONERR
- SPOLBUSY
- SPOLERR
- STRELERR
- TCIDERR
- TSIOERR
- UNEXPIN
- WRBRK
- WRONGSTAT
Examples
EXEC CICS HANDLE CONDITION
ERROR(ERRHANDL)
DUPREC(DUPRTN)
LENGERR