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

ASRA - Protection Exception


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Tue Sep 18, 2007 5:08 pm
Reply with quote

Hi,
I allocated memory for a pointer using GETMAIN.Then I set the address of a copybook to that pointer. The response code is 0. But when I move spaces or some values to any of the variable in that copybook, the program abends with ASRA(protection Exception). Please help me to identify what the problem is and also the solution for this

Thanks,
VG
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 18, 2007 5:15 pm
Reply with quote

Have you already looked at all of the existing topics for ASRA:

ibmmainframes.com/viewtopic.php?t=695
ibmmainframes.com/viewtopic.php?t=1637
ibmmainframes.com/viewtopic.php?t=3862
ibmmainframes.com/viewtopic.php?t=4934
ibmmainframes.com/viewtopic.php?t=3666
ibmmainframes.com/viewtopic.php?t=23797
ibmmainframes.com/viewtopic.php?t=24255
ibmmainframes.com/viewtopic.php?t=23887
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 5:27 pm
Reply with quote

vijiatcts wrote:
I allocated memory for a pointer using GETMAIN.Then I set the address of a copybook to that pointer.
CICS?
Please post the GETMAIN, the SET and part of the copybook and which section it is declared in....
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Tue Sep 18, 2007 5:56 pm
Reply with quote

Hi,

1)
EXEC CICS GETMAIN
SET (MQ-Q-TABLE-POINTER)
FLENGTH (LENGTH OF LS-MQ-Q-TABLE)
INITIMG (WS-SPACES)
RESP (WS-RESPONSE)
END-EXEC.

2)
SET ADDRESS OF LS-MQ-Q-TABLE TO MQ-Q-TABLE-POINTER

3)
01 LS-MQ-Q-TABLE.
COPY CEZMQQTB.

This copybook is declared in the Linkage Section.
Thanks,
VG
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 6:02 pm
Reply with quote

That's a good one....
Any ODO in the copybook?
Have you looked at the dump for the value of the pointer and the existance for the getmained storage?
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Tue Sep 18, 2007 6:13 pm
Reply with quote

Hi,
This is present in the copylib CEZMQQTB.It has occurs clause.

05 'QTABL-'TABLE OCCURS 20 TIMES
INDEXED BY 'QTABL-'IDX
'QTABL-'IDX2.
10 'QTABL-'QNAME PIC X(10).

05 'QTABL-'NAME-AREA.
10 'QTABL-'ENTIRE-NAME PIC X(48) VALUE SPACES.
10 'QTABL-'APPLICATION PIC X(06) VALUE SPACES.
10 'QTABL-'ADDTNL-FIELDS PIC X(03) VALUE SPACES.
10 'QTABL-'DATA-TYPE PIC X(05) VALUE SPACES.
And what is that u r asking next? sory I didn't get u....

Thanks,
VG
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 6:18 pm
Reply with quote

Yes, but no "depending on".....
Enough for the easy things, now you are going to have to look at the dump, find where in the program (which move) the abend occurs and what the value of the pointer is and if the storage still belongs to the transaction and if the pointer really does point to it.....
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Tue Sep 18, 2007 6:47 pm
Reply with quote

Hi,
I tried XPEDing the program. I made the allocation.The response is 0. Then i set the address of LS-MQ-Q-TABLE TO MQ-Q-TABLE-POINTER .
The value it displays for the pointer variable is this:

02 MQ-Q-TABLE-POINTER POINTER 'X 00000000
It means that it doen not hold any memory? isn't it?
So what shall i do?

Thanks,
VG
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 7:12 pm
Reply with quote

vijiatcts wrote:
02 MQ-Q-TABLE-POINTER POINTER 'X 00000000
It means that it doen not hold any memory? isn't it?
So what shall i do?
There is your ASRA.....Try verifying that the pointer is valid after the GETMAIN.....If it is, it is getting reset somewhere.....
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Wed Sep 19, 2007 5:38 pm
Reply with quote

Hi CICS Guy,

This is what i do..........

EXEC CICS GETMAIN
SET (MQ-Q-TABLE-POINTER)
FLENGTH (LENGTH OF LS-MQ-Q-TABLE)
INITIMG (WS-SPACES)
RESP (WS-RESPONSE)
END-EXEC.

IF RESP-OK
SET WS-MQ2-GETMAIN-DONE TO TRUE
SET ADDRESS OF LS-MQ-Q-TABLE TO MQ-Q-TABLE-POINTER

what is going wrong where?Please help

Thanks,
VG
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 19, 2007 6:00 pm
Reply with quote

Trty XPEDing the pointer right after the getmain......
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Wed Sep 19, 2007 6:08 pm
Reply with quote

Hi,
Yes...i tried..........then only i was able to find that the pointer points to no address.

Thanks,
VG
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 19, 2007 6:29 pm
Reply with quote

Where is the pointer defined?
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Wed Sep 19, 2007 6:53 pm
Reply with quote

It is declared in the working storage section............
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 19, 2007 7:37 pm
Reply with quote

So, are you saying that you getmain with a valid pointer and flength and get returned a response of zero and a pointer of zero?
If true, you have a greater problem than we can handle, maybe you should ask IBM......
Back to top
View user's profile Send private message
vijiatcts

New User


Joined: 19 Aug 2007
Posts: 9
Location: chennai

PostPosted: Wed Sep 19, 2007 7:50 pm
Reply with quote

Hi,
But there are similar programs...... they have no problem..... why this alone abends.....
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 19, 2007 8:07 pm
Reply with quote

vijiatcts wrote:
But there are similar programs...... they have no problem..... why this alone abends.....
If you are really saying that you getmain with a valid pointer and flength and get returned a response of zero and a pointer of zero, you have a problem because that is not the way a getmain works.....
I suspect the actual problem lies somewhere else, but without full access to you program and system, it is beyond me with the information provided......
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: Wed Sep 19, 2007 9:00 pm
Reply with quote

Hello,

Quote:
But there are similar programs...... they have no problem..... why this alone abends.....
There is some difference between the one that fails and the others that work.

The challange now will be to identify the difference(s). . . .

As CG posted
Quote:
I suspect the actual problem lies somewhere else, but without full access to you program and system, it is beyond me with the information provided......
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Check data with Exception Table DB2 0
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Exception Filter CA Products 0
No new posts DSNTEP2 - setting exception DB2 2
No new posts How to check ASRA ABEND CICS 2
Search our Forums:

Back to Top