View previous topic :: View next topic
|
Author |
Message |
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
the below code is failing with ASRA abend even though nohandle is given
Exec CICS ReadQ TS
QName ('GIDA0301_MCB_ADR')
Into (mAnchorAdr)
Item (1)
Length (Length of mAnchorAdr)
NoHandle
End-Exec
(mAnchorAdr) is a pointer ...
any idea ??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your ASRA is probably the CICS version of a s0c7 (data exception). I do not believe you can simply "not handle" that error and have the program continue.
You should determince the the cause of the exception and correct it. It may be as simple as the program checking for valid numeric data on input or it may be deeper in the code. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You should READQ INTO a data area.
You can READQ SET to a pointer. |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
but this code works fine .... it happens so tht once in a while the same piece of code gives ASRA abend ...i dont have ny idea y this is happening .... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
ashimer wrote: |
Exec CICS ReadQ TS
QName ('GIDA0301_MCB_ADR')
Into (mAnchorAdr)
Item (1)
Length (Length of mAnchorAdr)
NoHandle
End-Exec
(mAnchorAdr) is a pointer ... |
ashimer wrote: |
]but this code works fine .... it happens so tht once in a while the same piece of code gives ASRA abend |
mAnchorAdr has the equivilent picture of S9(8) and a length of 4.
You are reading the first 4 bytes of item 1 into it.
Assuming you have the pointer defined in your storage, that will work without any problem.
The nohandle does not affect abends that occur after the EC is done.
If the pointer is used after your read corrupted it, then you will very likely get an abend, which one depends on how you are using the pointer.
If the pointer is supposed to be pointing to the area you want the data returned, you need to use the SET and the length needs to be a data area for the EC to put the length of the item from TS. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I'd suggest you look for the "bad data" that causes the abend.
Can you cause this abend or does it only happen rarely by different users? If it is repeatable, you can isloate it using whatever debug tool your site uses. If it rarly occurs, you may need to collect a few transaction dumps and work thru them.
A couple of things to look at:
Are all input fields validated properly?
Are all working-storage variables initialized?
Is there any data read (vsam/database) that may not be "clean"? |
|
Back to top |
|
|
|