There are many types of abends and errors which one can face while using a CICS application. Errors can arise due to both hardware of software issues. We will be discussing about errors and error handling in this module.
Following are the CICS errors which can arise during the execution of CICS applications −
Some expected CICS errors arise when the conditions are not normal in the CICS system. For example, if we are reading a particular record and the record is not found, then we get the "Not Found" error. Mapfail is a similar error. Errors in this category are handled by explicit logic in the program.
Logical errors arise due to some reasons like division by zero, illegal character in numeric field, or transaction id error.
Errors that are related to hardware or other system conditions are beyond the control of an application program. For example, getting input/output error while accessing a file.
CICS provides several mechanisms to identify the errors and to handle them in our programs. Following are the commands which are used to handle the expected CICS errors −
|Sr.No||Handling Commands & Description|
Handle condition is used to transfer the control of the program to a paragraph or a procedure label.
If a program abends due to some reasons like input-output error, then it can be handled using Handle Abend CICS command.
Abend command is used to terminate the task intentionally.
Ignore condition is used when we want no action to be taken if a particular abend or error happens which is mentioned inside the Ignore Condition.
Nohandle can be specified for any CICS command.