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

ASRA abend even though nohandle is given


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Mar 21, 2007 1:33 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Mar 21, 2007 2:53 am
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Mar 21, 2007 3:21 am
Reply with quote

You should READQ INTO a data area.
You can READQ SET to a pointer.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Wed Mar 21, 2007 4:25 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Mar 21, 2007 6:19 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Mar 21, 2007 7:44 pm
Reply with quote

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
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 9
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Need to get an DLI abend like U0200 IMS DB/DC 2
Search our Forums:

Back to Top