
Reply to comment
Reply
Click the +1 button below to share it with your friends and colleagues
Share this if you liked it!
Click the +1 button below to share it with your friends and colleagues
t-decoration:none;text-underline:none'>IBM DB2 Certification
LOGOUT
Number of Registered users 713
|
CICS Handle conditions should be avoided at all costs. They lead to unstructured complicated convoluted logic and code.
Handle conditions where required in the days before CICS had the RESP as part of it's repetoir.
Handle conditions cause the program to jump to the specified label when the condition occurs, and so is an implicit use of a "go to" statement.
Today CICS allows us to use the RESP as part of the EXEC CICS command which means we can evaluate the response immedietly after the exec CICS command has been executed and appropriate logic can be codded without a "go to". This means more structured and easier to use code.
e.g.
EXEC CICS
READ DATASET(ABCD)
...
...
RESP(W01-EIBRESP)
END-EXEC
EVALuate W01-EIBRESP
WHEN DFHRESP(NORMAL)
continue
WHEN DFHRESP(NOTFOUND)
perform not found logic
when other
perfom appropriate logic
End-Evaluate
If I was QA'ing your code and you used a Handle condition, your code would fail the QA and be returned to you to fix.