View previous topic :: View next topic
|
Author |
Message |
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Trty XPEDing the pointer right after the getmain...... |
|
Back to top |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
Hi,
Yes...i tried..........then only i was able to find that the pointer points to no address.
Thanks,
VG |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Where is the pointer defined? |
|
Back to top |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
It is declared in the working storage section............ |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
vijiatcts
New User
Joined: 19 Aug 2007 Posts: 9 Location: chennai
|
|
|
|
Hi,
But there are similar programs...... they have no problem..... why this alone abends..... |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|