Comprehensive Educational information on Computer Programming!: CICS - Error Handling

Saturday, February 23, 2019

CICS - Error Handling

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.

CICS Errors

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.

Error Handling Commands

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.NoHandling Commands & Description
1Handle condition
Handle condition is used to transfer the control of the program to a paragraph or a procedure label.
2Handle Abend
If a program abends due to some reasons like input-output error, then it can be handled using Handle Abend CICS command.
3Abend
Abend command is used to terminate the task intentionally.
4Ignore Condition
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.
5Nohandle
Nohandle can be specified for any CICS command.

No comments:

Post a Comment