View previous topic :: View next topic |
Author |
Message |
LEO Beginner
Joined: 26 Jan 2006 Posts: 11 Topics: 4 Location: Minneapollis
|
Posted: Thu Apr 13, 2006 4:52 pm Post subject: Handle condition |
|
|
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 |
|
 |
German Castillo Beginner

Joined: 23 Dec 2005 Posts: 83 Topics: 2 Location: Caracas, Venezuela
|
Posted: Thu Apr 13, 2006 7:07 pm Post subject: |
|
|
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 |
|
 |
|
|