HANDLE CONDITION
An older CICS command that tells the program where to jump when a later command fails with a given condition.
Also written HANDLE ABEND, IGNORE CONDITION, HANDLE AID, NOHANDLE
HANDLE CONDITION is the older way of dealing with errors in CICS programs. Before running commands, the program says which paragraph to go to if a condition happens: EXEC CICS HANDLE CONDITION NOTFND(9100-NOT-FOUND) END-EXEC. If a later READ finds no record, control jumps to that paragraph.
Related commands follow the same idea. HANDLE AID chooses a paragraph for each key the user might press. HANDLE ABEND names a routine to run if the task abends. IGNORE CONDITION tells CICS to carry on as if nothing happened.
If a condition happens and nothing handles it, CICS ends the task with an abend, usually with a code starting AEI, which can be confusing for the user.
The jumps make programs hard to follow, because a command in one place can send control to a paragraph far away. Modern programs use RESP on each command instead, or NOHANDLE, and check the result in the next statement. You need to recognise HANDLE CONDITION in older code, but for new work, use RESP.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- EXEC CICSThe way a program asks CICS to do something, such as read a record, send a screen or call another program.
- EIBThe EXEC Interface Block: a set of fields CICS fills in for every task, telling the program about the current transaction.
- CICS transactionOne unit of online work in CICS: the whole exchange of receiving a request, doing the work, and sending a response.
- AbendAn abnormal end: a program stopping in an uncontrolled way rather than finishing and reporting a result.
- CICSThe transaction manager that runs online mainframe applications, and the software behind a great many screens bank staff use.