When a CICS® application is running under Language Environment® , the action taken when a task is scheduled for abnormal termination depends on whether a CICS HANDLE ABEND is active or not active.
When a HANDLE ABEND is active, Language Environment condition handling does not gain control for any abends or program interrupts, and any user-written condition handlers that have been established by CEEHDLR are ignored. Instead, the action defined in the CICS HANDLE ABEND takes place.
When a CICS HANDLE ABEND is not active, Language Environment condition handling does gain control for abends and program interrupts if the runtime option TRAP(ON) is specified. Normal Language Environment condition handling is then performed. If TRAP(OFF) is specified, no error handling takes place; the abend proceeds. For details of the actions taken during normal Language Environment condition handling, see the z/OS: Language Environment Programming Guide.
The runtime option USRHDLR allows you to register a user-written condition handler at the highest level. At a lower level, for example after a subroutine CALL, you can use the CEEHDLR service to register a condition handler for that level. This lower level handler is automatically unregistered on return from the lower level. If desired you can explicitly unregister it by using the CEEHDLU service. For an explanation of stack levels and for details of the USRHDLR runtime option and the CEEHDLR and CEEHDLU services, see the z/OS: Language Environment Programming Guide.
If you write your own user-written Language Environment condition handler (other than in COBOL), you can use most CICS commands, provided they are coded with a NOHANDLE, RESP or RESP2 option, to prevent further conditions being raised during execution of the condition handler. The only commands you cannot use are the following, which must not appear in either the condition handler or any program it calls:
Unless you use the NOLINKAGE translator option (see NOLINKAGE), do not use the CICS translator to translate a COBOL user-written condition handler that you have registered for a routine using the CEEHDLR service. This is because the CICS translator adds two extra arguments to the PROCEDURE DIVISION header of the COBOL program, the EXEC Interface Block (EIB) and the COMMAREA. These arguments do not match the arguments passed by Language Environment. A COBOL condition handler cannot, therefore, contain any CICS commands.
However, a user-written condition handler can call a subroutine to perform CICS commands (and this could be a COBOL routine). If you need to pass arguments to this subroutine, place two dummy arguments before them in the caller. The called subroutine must issue EXEC CICS ADDRESS EIB(DFHEIPTR) before executing any other CICS commands.
For full details of the required interface to any Language Environment condition handling routine, see the z/OS: Language Environment Programming Guide.
[[ Contents Previous Page | Next Page Index ]]