Sie sind auf Seite 1von 7

IBM MAINFRAMES

CICS Training Class -05

www.mainframes-online-training.weebly.com

Polsani Anil Kumar

Error Handling

An ERROR in CICS mostly know as CONDITIONS


When the error occurs the program can perform any of the
following

1. Rely on the system default action i.e., system will terminate


or suspend the task

2. Pass control to a specified paragraph. This could be done by


using HANDLE CONDITION command

3. Take no action and let the program continue on a command


failure. A return code is set in EIBRESP and this status occurs
because of NOHANDLE/RESP/IGNORE CONDITION.

HANDLE CONDITION

HANDLE CONDITION specifies the name of condition and


the location within the program to be branched.

It remains active while the program is executing or until it


encounters IGNORE/ANOTHER HANDLE CONDITION.

Syntax:
EXEC CICS HANDLE CONDITION
ERROR(ERRORHANDLE)
LENGTHERR(LENGTHRTN)
END-EXEC.

IGNORE CONDITION

IGNORE CONDITION specifies the name of the condition


to be ignored ( no action will be taken)

Syntax
EXEC CICS IGNORE CONDITION
ITEMERR
LENGERR
END-EXEC.

THIS CONDITIONS WILL NOT HAVE ANY ACTION IF


IT occurs

NOHANDLE & RESP

NOHANDLE to specify no action to be taken for any


condition or attention identifier(aid)

RESP(DATAITEM) where DATAITEM is a user-defined


full word binary data area, On return from the command it
contains a return code later, it can be tested by means of
DFHRESP as follows

If DATAITEM = DFHRESP(NORMAL)

PUSH & POP

To suspend and restore all current handle condition/handle


aid / handle abend/ ignore condition.

Mostly used with subprograms

While returning the control it can restore the handle command


using POP HANDLE

Syntax

While receiving the control a sub-program can suspend handle


command of the called program using PUSH HANDLE

EXEC CICS PUSH HANDLE END-EXEC.


EXEC CICS POP HANDLE END-EXEC.

Thank You

Polsani Anil Kumar


www.mainframes-online-training.weebly.com

Polsani Anil Kumar

Das könnte Ihnen auch gefallen