MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Handle condition

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
LEO
Beginner


Joined: 26 Jan 2006
Posts: 11
Topics: 4
Location: Minneapollis

PostPosted: Thu Apr 13, 2006 4:52 pm    Post subject: Handle condition Reply with quote

Hi,

I HAVE THE FOLLOWING CODE. When RECORD-NOT-FOUND condition is raised it is going to 7700- para and then to 7800- para. It is not getting back to 2000- para. Any idea why this is happening ? Please advise..thanks

2000- PARA.
.............

PERFORM 7100-READ-MASTER-FILE.

........

2000-EXIT.

7100-READ-MASTER-FILE.


EXEC CICS HANDLE CONDITION
NOTFND(7700-RECORD-NOT-FOUND)
NOTOPEN(7800-FILE-NOT-OPEN)
DISABLED(7900-FILE-DISABLED)
END-EXEC.

....

7100-EXIT

7700-RECORD-NOT-FOUND.

MOVE APPLICATION-NOT-FOUND
TO WS-DB-ACCESS-RETURN-STATUS.

7700-EXIT.
EXIT.

7800-FILE-NOT-OPEN.
MOVE ' VSAM FILE IS NOT OPEN' TO WEB-RESPONSE-ERR-TEXT(9:22).
PERFORM 5000-BUILD-ERROR-REC THRU 5000-EXIT.

7800-EXIT.
EXIT.
Back to top
View user's profile Send private message
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Thu Apr 13, 2006 7:07 pm    Post subject: Reply with quote

My crystal ball doesn't show anything. This ussually means that it doesn't have enough information to work upon....

Why do you assume it has to return somewhere else?


Now one simple clue...

An exit paragraph/statement doesn't insure proper return to the calling routine...


Take a look at the assembly expansion of your cobol routines.


Basically what they do upon entrance to a paragraph is the SAVING of the return point somewhere in the TGT area. When it returns it has to FETCH the same return address from the same point. NOW... If you have entered a routine with a GOTO (Which is basically what a handle condition DOES) you do not have to think that the returning point would be the same as the one that INVOKED that routine itself, as opossed to the one that made the exception to be raised, right?


A workable way around in your situation may be using a Perform/goto inside your exception routine....
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group