Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
ASRA - Protection Exception
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
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
References
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3296
Location: Charlotte,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: 1199
Location: At my desk

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: 1199
Location: At my desk

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: 1199
Location: At my desk

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: 1199
Location: At my desk

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: 1199
Location: At my desk

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

Senior Member


Joined: 20 Oct 2006
Posts: 1633
Location: germany

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: 1199
Location: At my desk

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2