Professional Documents
Culture Documents
Ibm Mainframes: CICS Training Class - 05
Ibm Mainframes: CICS Training Class - 05
Error Handling
1. #. &.
An ERROR in CICS mostly know as CONDITIONS When the error occurs the program can perform any of the following ely on the system !efault action i.e." system will terminate or suspen! the task $ass control to a specifie! paragraph. This coul! %e !one %y using HANDLE CONDITION comman! Take no action an! let the program continue on a comman! failure. A return co!e is set in 'I( 'S$ an! this status occurs %ecause of NOHANDLE/RESP/IGNORE CONDITION.
HANDLE CONDITION
HANDLE CONDITION specifies the name of con!ition an! the location within the program to %e %ranche!. It remains acti)e while the program is e*ecuting or until it encounters I+NO ',ANOT-' -AND.' CONDITION.
Synta*/ '0'C CICS HANDLE CONDITION ' O 1' O -AND.'2 1.'N+T- TN2 .'N+T-' 'ND3'0'C.
NOHANDLE to specify 4no action to %e taken for any con!ition or attention i!entifier1ai!2 RESP(DATAITEM2 where DATAIT'5 is a user3!efine! full wor! %inary !ata area" On return from the comman! it contains a return co!e later" it can %e teste! %y means of D6- 'S$ as follows If DATAIT'5 7 D6- 'S$1NO 5A.2
IGNORE CONDITION
IGNORE CONDITION specifies the name of the con!ition to %e ignore! 1 no action will %e taken2
To suspen! an! restore all current han!le con!ition,han!le ai! , han!le a%en!, ignore con!ition. 5ostly use! with su%programs While recei)ing the control a su%3program can suspen! han!le comman! of the calle! program using PUSH HANDLE While returning the control it can restore the han!le comman! using POP HANDLE
Synta*
'0'C CICS PUSH HANDLE 'ND3'0'C. '0'C CICS POP HANDLE 'ND3'0'C.
Thank o!