Clicky
Skip to Content
Custom Search

Reply to comment

Alan.R.Wynne
Offline
Joined: 07/07/2011
CICS Handle Conditions.

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.

Reply

  • Allowed HTML tags:
      1. Lines and paragraphs break automatically.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Navigation

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Number of Registered users 713
Theme by Dr. Radut.