IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CICS ASRA Abend (Protection Exception) Help


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cyrus.e.cabrera

New User


Joined: 25 Jul 2011
Posts: 14
Location: Philippines

PostPosted: Thu May 17, 2012 8:33 am
Reply with quote

Hi guys,

I just want to ask help on this matter,

I have this particular code that declares an ABEND Protection Exception.

Code:
MOVE LT-ONE-LIT          TO CC-DTL-IDX       
                            SC-SCR-DISPLAY-IDX
                            SC-IDX.           
                                             



When I try to move the variable LT-ONE-LIT to SC-SCR-DISPLAY-IDX and SC-IDX that's when the abend happens.

all of this variables have the same data type: S9(4) comp.

SC-***** main variable (elementary item if the term is right): SC-STEP-CONTEXT-AREA

Values moved to SC-STEP-CONTEXT-AREA:
Code:
SET ADDRESS OF SC-STEP-CONTEXT-AREA TO       
    ADDR-EXCHANGE-CONTEXT.                   


ADDR-EXCHANGE-CONTEXT is a POINTER.
Code:
    LV ---- COBOL DATANAME ---------- -- ATTRIBUTES -- ----+---10----+---20--->
    02 ADDR-EXCHANGE-CONTEXT          POINTER       'X 2D9785EF                 



The statement above is the first occurence of usage of the said variable. No previous moves happened before this.


Thank you and God bless.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 17, 2012 8:53 am
Reply with quote

Hello,

Somewhere you are pointing to an address that does not belong to your process.

The problem is not the data type, but rather where it is located.

You need to verify the address as being valid for your run.
Back to top
View user's profile Send private message
cyrus.e.cabrera

New User


Joined: 25 Jul 2011
Posts: 14
Location: Philippines

PostPosted: Thu May 17, 2012 11:12 am
Reply with quote

Hi,

Thank for your immediate response.

May I ask what are the common methods to know if the address is valid? I am new on debugging this kind of problem.

Your help is appreciated. Meanwhile, I will try to track the ADDR-EXCHANGE-CONTEXT on the code since it cannot be seen when not Xpedited.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu May 17, 2012 12:53 pm
Reply with quote

You definitely need to concentrate on ADDR-EXCHANGE-CONTEXT. It contains an invalid address (pointing to storage to which you don't have access).

You need to find where it is given any values. Where is it defined? If in some other module, you have to check whether it is getting passed correctly to your module.

You have to locate everywhere where it gets set. If it starts off with correct values, you have to "watch" it through to the point where it becomes incorrect.

It might be something "simple" like a bunch of pointers in a copybook and not using the same copybook in different modules.
Back to top
View user's profile Send private message
cyrus.e.cabrera

New User


Joined: 25 Jul 2011
Posts: 14
Location: Philippines

PostPosted: Thu May 17, 2012 4:47 pm
Reply with quote

Bill Woodger wrote:
You definitely need to concentrate on ADDR-EXCHANGE-CONTEXT. It contains an invalid address (pointing to storage to which you don't have access).

You need to find where it is given any values. Where is it defined? If in some other module, you have to check whether it is getting passed correctly to your module.

You have to locate everywhere where it gets set. If it starts off with correct values, you have to "watch" it through to the point where it becomes incorrect.

It might be something "simple" like a bunch of pointers in a copybook and not using the same copybook in different modules.



Thank you for the advice Bill. As of now, I am having a hardtime pin-pointing the location of the first pass for this variable. I don't have any experience on debugging this kind of PROTECTION EXCEPTION RELATED ABEND.

I think I will look at the parent module of this so that I can check the passing of data. However, I am not confident if I am able to know that the data passed is correct. Moreover, I will definitely try what you have suggested.

I will update this post if I accidentally find the solution.


Godspeed.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu May 17, 2012 5:04 pm
Reply with quote

If you have debugging tools installed at your site, such as Xpediter, use them. Otherwise, if the transaction is started at a terminal, try using CEDF to look at the data being passed from calling program to subprogram.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu May 17, 2012 6:02 pm
Reply with quote

Quote:
I don't have any experience on debugging this kind of PROTECTION EXCEPTION RELATED ABEND.

I think I will look at the parent module of this so that I can check the passing of data. However, I am not confident if I am able to know that the data passed is correct. Moreover, I will definitely try what you have suggested.

I will update this post if I accidentally find the solution.


Don't get hung-up on the particular type of abend. If your pointer were a COMP-3 and you were using it in a calculation and it had a sufficiently invalid value, you'd get a DATA EXCEPTION. You'd have to look for the cause in exactly the same way.

Definitely, if it has come from another module, you must look there. If it goes to other modules before yours, check there.

Somewhere originally it has been given a value which is an address to a piece of storage for you to use. Either it has done that incorrectly, or after that something has clobbered it, or your linkage doesn't match up so it looks "clobbered" when you try to use it.

What you have to do is: find where it first gets a value; check that the value is correct; if yes, check it where it goes off to anywhere else first; check it as it arrives in your module.

Once you have some idea of where it happened, then you can start to narrow it down.

Have a little more confidence. The only way you find it "by accident" is if you start changing code, running, changing again, etc, and stumble on a "fix", without knowing why, how or anything (and it is probably not the full story).

If you go looking for the problem, and you know enough to identify it when you see it, there is no accident involved.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts ISAM and abend S03B JCL & VSAM 9
No new posts Check data with Exception Table DB2 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top