Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ASRA - Protection Exception

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: ASRA - Protection Exception
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

Moderator Team Head


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

PostPosted: Tue Sep 18, 2007 5:15 pm    Post subject: Reply to: ASRA - Protection Exception
Reply with quote

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

http://ibmmainframes.com/viewtopic.php?t=695
http://ibmmainframes.com/viewtopic.php?t=1637
http://ibmmainframes.com/viewtopic.php?t=3862
http://ibmmainframes.com/viewtopic.php?t=4934
http://ibmmainframes.com/viewtopic.php?t=3666
http://ibmmainframes.com/viewtopic.php?t=23797
http://ibmmainframes.com/viewtopic.php?t=24255
http://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: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 5:27 pm    Post subject: Re: ASRA - Protection Exception
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 6:02 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 6:18 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 7:12 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 19, 2007 6:00 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 19, 2007 7:37 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 19, 2007 8:07 pm    Post subject:
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

Site Director


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

PostPosted: Wed Sep 19, 2007 9:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Facing xml parser exception 798761 murugan_mf COBOL Programming 17 Sat Apr 30, 2016 1:27 pm
No new posts Exception Handling in Native Stored P... Mariraj DB2 1 Thu Feb 25, 2016 4:08 am
No new posts ASRA abend calling Assembler from CICS surya8 PL/I & Assembler 13 Thu Sep 10, 2015 7:50 pm
No new posts S0C7 Data Exception Error Niti Srivastava ABENDS & Debugging 4 Mon Feb 23, 2015 5:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us