Interview Questions

Explain how to handle exceptional conditions in CICS.

CICS Interview Questions


(Continued from previous question...)

Explain how to handle exceptional conditions in CICS.

An abnormal situation during execution of a CICS command is called an exceptional condition:
1. Handle Condition Command: It is used to transfer control to the procedure label specified if the exceptional condition specified occurs.
2. Ignore Condition Command: It causes no action to be taken if the condition specified occurs in the program. That is control will be returned to the next instruction following the command which encountered the exceptional condition.
3. No Handle Option: This option can be specified in any CICS command and it will cause no action to be taken for any exceptional condition occurring during execution of this command.
4. RESP Option: This option can be specified in any CICS command. If the RESP option is specified in a command, CICS places a response code at a completion of the command. The application program can check this code, then proceed to the next processing.

Handle condition:
Invalid handling of CICS error condition within the program causing the looping. Here is one example, most program have EXEC CICS HANDLE CONDITIN ERROR (lable) or EXEC CICS HANDLE ABEND LABEL (lable) to trap any error condition or abend. This type of coding is usually acceptable if they handle the error / abend correctly in their handling paragraph. However, the program often cause another error or abend within the handling routine. In that case, looping or sos will occur. I strong recommend that the following statement should be included in their ERROR handling paragraph.

EXEC CICS HANDLE CONDTION ERROR END-EXEC. It means that from now on, CICS will handle all the errors and will not go back to error handling routine. For HANDLE ABEND, code EXEC CICS HANDLE ABEND CANCEL instead. Please check the application program reference manual for further explanation of these two commands. Besides, not only these two HANDLE will cause the program, other type of error handle might cause loop too. So code the HANDLE command carefully. It is a good program practice to deactivate the error handling by EXEC CICS HANDLE CONDITION condtion END-EXEC. Once you know that the program won't need it any more.

(Continued on next question...)

Other Interview Questions