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

How to fix ASRA abend in CICS


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

New User


Joined: 24 Mar 2005
Posts: 11
Location: mumbai

PostPosted: Thu Jun 16, 2005 9:42 am
Reply with quote

plz help me in solving ASRA Abend (Addressing or Arithmetic Exception)
Back to top
View user's profile Send private message
subbprem

New User


Joined: 20 Apr 2005
Posts: 9
Location: Chennai

PostPosted: Thu Jun 16, 2005 10:34 am
Reply with quote

Hi,

To solve ASRA abend, first we need to identify where it actually occurs.

To locate problem we can make use of debugging tools like Xpeditor, cedf. Most of the times even normal text send stmts would help us.

Once we got the problem area, we would come to know the causes for the ASRA abend. Then we can easily solve that.

Understanding ASRA Abend:

Addressing Exception:
The ASRA abend is triggered when a program attempts to access or reference memory locations outside its valid address range. This could occur due to an invalid memory address calculation or pointer manipulation.

Arithmetic Exception:
In some cases, ASRA can also indicate an arithmetic exception, such as division by zero, overflow, underflow, or invalid arithmetic operation.

Common Causes:
ASRA abends can result from programming errors, data anomalies, incorrect usage of pointers or arrays, inadequate error handling, or unexpected conditions during program execution.

Steps to Resolve ASRA Abend:

Review Abend Messages:
Examine the ASRA abend message and associated dump to identify the specific instruction, data, or memory access causing the exception.

Code Inspection:
Review the COBOL program code, focusing on arithmetic operations, array or pointer manipulations, and memory access routines.
Verify that calculations involving memory addresses, indices, or pointers are correct and within valid ranges.

Data Validation:
Implement data validation checks to ensure that input data is valid and does not lead to arithmetic exceptions or invalid memory accesses.

Error Handling:
Enhance error handling mechanisms in the program to detect and handle arithmetic or addressing exceptions gracefully.
Include explicit checks for division by zero, overflow, underflow, and other arithmetic conditions that may cause ASRA abends.

Boundary Conditions:
Pay attention to boundary conditions, especially in loop iterations, array accesses, or data processing routines, to prevent out-of-bounds memory access.

Testing and Debugging:
Use debugging tools, simulation environments, and test cases to reproduce the ASRA abend scenario and identify the root cause.
Conduct thorough testing with various input data sets to validate program behavior and address potential exceptions.

-----------------------------
Regards,
Prema.
Back to top
View user's profile Send private message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Thu Jun 16, 2005 4:12 pm
Reply with quote

An ASRA abend 0C7 (data exception) COBOL example:
Code:
NERACTSI   --- CICS TRANSACTION DUMP ---  CODE=ASRA   TRAN=NESW   ID=1/0005    DATE=00/08/08   TIME=16:23:40   PAGE    1
SYMPTOMS= AB/UASRA PIDS/565501800 FLDS/DFHABAB RIDS/DCNESW00
CICS/ESA LEVEL = 0410
PSW & REGISTERS AT TIME OF INTERRUPT
PSW                079D1000   8EDF0032   00060007   057E5000
REGS 0-7           0E505354   0E504700   0E5061F8   002010D0           0E5061A8   00000006   00000000   00000006
REGS 8-15          002018D8   0E5051B8   0EDEF2CC   0EDEF9B0           0EDEF2AC   0E5044F0   8EDEFDFC   00000000


From the above info. from page 1 of this abend, we can determine the following (and more):

NERACTSI is the applid of the running CICS region.
(CICSTSTI is the UFCNS jobname, btw.)
The CICS abend code is "ASRA" (CODE=ASRA).
The CICS transaction identifier is "NESW" (TRAN=NESW).
The CICS program identifier is DCNESW00 (RIDS/DCNESW00).
The second fullword of the PSW (Program Status Word) tells us that the NSI (Next Sequential Instruction) after the failing instruction is at x'8EDF0032'. Recall that a fullword (or simply "word") is 4 bytes. A halfword is 2 bytes. A byte is 8 bits or 2 "nibbles". x'C7' represents one byte or 2 nibbles. The bit representation of x'C7' is 11000111.
The third full word of the PSW tells us that the failing instruction length is 6 bytes and the type of program interrupt is "7" (commonly known as "0C7" or "S0C7" or "sock seven").
first second third fourth
fullword: fullword: fullword: fullword:

PSW 079D1000 8EDF0032 00060007 057E5000
| | |
| | type
| length
|
high order
32-bit is on,
so assume
31-bit mode

TASK CONTROL AREA (SYSTEM AREA)
Code:
00000000   00000000 00000000 00000000 00000000  0000285C 0DFB7188 00000045 00000000   *...................*...h........*   00057180
00000020   00000000 00000000 00000000 0013F100  00000000 00000000 00000000 00000000   *..............1.................*   000571A0
00000040   0E50F2A0 00000000 00000000 00000000  00000000 00000000 00000000 00000000   *..2.............................*   000571C0
00000060   00000000 00000000 00000000 00000000  00000000 00000000 80000000 C1E2D9C1   *............................ASRA*   000571E0
NERACTSI   --- CICS TRANSACTION DUMP ---  CODE=ASRA   TRAN=NESW   ID=1/0005    DATE=00/08/08   TIME=16:23:40   PAGE    3
00000080   00000000 000574E4 00000000 00000000  00057388 00205BB0 00201128 002013E0   *.......U...........h..$.........*   00057200
000000A0   00000000 80045080 00000000 00000000  D5C5E2E6 0E6A7618 00000000 00000000   *................NESW............*   00057220
000000C0   00000000 D5C5E2E6 00000040 00000000  00000000 C1E2D9C1 00000000 0F2564C8   *....NESW... ........ASRA.......H*   00057240
000000E0   00000000 0007F030 00000000 00000000  B476C40F C6051A01 00000000 00000000   *......0...........D.F...........*   00057260
00000100   00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000   *................................*   00057280
00000120   00000000 00000000 00000000 00000000  80045F60 00000000 00000000 0005756C   *...................-............*   000572A0
00000140   00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000   *................................*   000572C0
00000160   00000000 00000000 180FC6D3 C1D5C5D9  4BE3C5C4 D4C2F0F0 F076C40F C605E400   *..........FLANER.TEDMB000.D.F.U.*   000572E0
00000180   01000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000   *................................*   00057300
000001A0   00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000   *................................*   00057320
000001C0   00000000 00000000 01900047 00201008  00000000 00000000 00000000 00105538   *................................*   00057340
000001E0   00000000 00000000 C4C3D5C5 E2E6F0F0  F0C3F761 C1D2C5C1 00000EA2 00020781   *........DCNESW000C7/AKEA...s...a*   00057360
00000200   00000000 00000000                                            |             *........                        *   00057380
                                                                        |
                                                                      offset


From the above info., we can determine the following (and more):

An abend (code 0C7/AKEA) has occurred at offset X'00000EA2' in program DCNESW00. Look for the string DCNESW000C7/AKEA in the display portion of the dump, then look for the first full word after this string in the hex portion of the dump: 00000EA2. This is the offset from the load point (vs the entry point) of the problem program (DCNESW00).
To determine the offset from the entry point of the program we need to look at the LINKEDIT/BINDER listing and subtract the offset of our program, x'20', from x'EA2', giving x'E82':
DFSMS/MVS V1 R5.0 BINDER 16:23:16 TUESDAY AUGUST 8, 2000
BATCH EMULATOR JOB(DCNESW00) STEP(COBOL3 ) PGM= IEWL PROCEDURE(LKED )
IEW2278I B352 INVOCATION PARAMETERS - LIST,MAP,XREF,LET,RENT,AMODE=31,RMODE=ANY

IEW2322I 1220 1 INCLUDE SYSLIB(DFHECI)


*** M O D U L E M A P ***

---------------
CLASS B_TEXT LENGTH = 3B70 ATTRIBUTES = CAT, LOAD, RMODE=ANY ALIGN = DBLWORD
---------------

SECTION CLASS ------- SOURCE --------
OFFSET OFFSET NAME TYPE LENGTH DDNAME SEQ MEMBER

0 DFHECI CSECT 20 SYSLIB 01 DFHECI
8 8 DFHEI1 LABEL
8 8 DLZEI01 LABEL
8 8 DLZEI02 LABEL
8 8 DLZEI03 LABEL
8 8 DLZEI04 LABEL
offset ---> 20 DCNESW00 CSECT 2F38 SYSLIN 02 **NULL**

2F58 CEESG005 * CSECT 18 SYSLIB 02 CEESG005

2F70 CEEBETBL * CSECT 24 SYSLIB 02 CEEBETBL

2F98 CEESTART * CSECT 7C SYSLIB 02 CEESTART

3018 IGZCBSO * CSECT 568 SYSLIB 02 IGZCBSO

3580 CEEARLU * CSECT B8 SYSLIB 02 CEEARLU

[snip]


Another way to determine the failing instruction offset (without using the LINKEDIT/BINDER listing) is as follows:

Subtract the entry point (ENTRY PT) of DCNESW00 from the PSW. Both the load point (LOAD PT.) and entry points of DCNESW00 are listed in the "MODULE INDEX" portion near the end of the CICS transaction dump listing as follows:
----- MODULE INDEX -----
LOAD PT. NAME ENTRY PT LENGTH
0EDEF190 DCNESW00 0EDEF1B0 00003B70

The PSW at the top of the transaction dump listing contains 8EDF0032 and the entry point from the module index is 0EDEF1B0. Because IBM uses 31-bit addressing (instead of 32-bit addressing), we ignore the high order bit of the PSW and subtract the entry point address x'0EDEF1B0' from the second full word of the PSW x'0EDF0032' resulting in x'E82'. Recall that this is the same offset that we obtained above.
There will be many programs (modules) listed in the MODULE INDEX of a dump. A useful technique is to position yourself at the bottom of the dump and then do a 'find program prev' to find the program in the module index.
Next, we need to look at the COBOL compilation listing and the COBOL LIST option "assembler" option listing for x'000E82', where we see an UNPK instruction when the COBOL ADD verb was compiled at statement 000513 (suspiciously in a paragraph labeled "4700-DATA-EXCEPTION"):
[snip]
000074 WORKING-STORAGE SECTION.
[snip]
000115 10 WS-RECEIVE-COUNT PIC X(02) VALUE SPACES. BLW=0000+3A7,0000347 2C
IMP

000134 10 WS-RECEIVE-COUNT-PIC9 REDEFINES WS-RECEIVE-COUNT BLW=0000+3A7,0000347 2C
115
000135 PIC 9(02).

000147 05 WS-READ-COUNT PIC 9(4) VALUE ZERO. BLW=0000+408,0000000 4C
IMP
[snip]
000265 PROCEDURE DIVISION using dfheiblk dfhcommarea.
[snip]
000510 4700-DATA-EXCEPTION.
000511
000512 MOVE "++" TO WS-RECEIVE-COUNT. 115
000513 ADD WS-RECEIVE-COUNT-PIC9 TO WS-READ-COUNT. 134 147
[snip]

000512 MOVE
000E6C D201 23A7 A614 MVC 935(2,2),1556(10) (BLW=0)+935 PGMLIT AT +1428
000513 ADD
PP 5688-197 IBM COBOL for MVS & VM 1.2.2 DCNESW00 Date 08/08/2000 Time 16:23:11 Page 45
000E72 F223 D210 2408 PACK 528(3,13),1032(4,2) TS2=24 WS-READ-COUNT
000E78 960F D212 OI 530(13),X'0F' TS2=26
--> 000E7C FA21 D210 A612 AP 528(3,13),1554(2,10) TS2=24 PGMLIT AT +1426
000E82 F332 2408 D210 UNPK 1032(4,2),528(3,13) WS-READ-COUNT TS2=24
000E88 96F0 240B OI 1035(2),X'F0' WS-READ-COUNT+3
000E8C 47F0 BDB2 BC 15,3506(0,11) GN=18(0015B2)
000E90 GN=17 EQU *

From the above COBOL listing(s), we can determine:

Since the NSI is at offset x'E82', the failing instruction is the AP (Add Packed/Decimal) at offset x'E7C', which is a 6 byte instruction. Recall that we had already determined that the length of the failing instruction was 6 bytes, based upon the 2 high order bytes of the third full word of the PSW containing 0006.
Adding "++" to zero caused this data exception. We can confirm this by closer analysis of the contents of the storage referenced by the AP instruction. Here's some of the storage addressed by register 10 (R10/"A") and register 13 (R13/"D"):
R10+612 (x'0EDEF8DE'):

00000700 D6E4E340 40C9C7E9 E2D9E3C3 C4D5C5E6 E2F0F140 40C4C3D5 C5C1E2E4 C2C4C3D5 *OUT IGZSRTCDNEWS01 DCNEASUBDCN* 0EDEF890
00000720 C5E2E6E2 C4C3D5C5 E2E6D400 400000F0 F0F0F1F0 F0F0F0C2 C1D9C600 019000FF *ESWSDCNESWM. ..00010000BARF.....* 0EDEF8B0
00000740 FFFFFF00 000C0050 05860043 7FFF0EEF 4E4E01F4 009F004F 40000000 0025C000 *.........f......++.4.... .......* 0EDEF8D0
|
here

R13+210 (x'0E504700'):

00000F20 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................* 0E504620
00000F40 LINES TO 00000FE0 SAME AS ABOVE 0E504640
00001000 00000F00 0000006C 8E50623C 27010000 00000000 0000000C 00000000 00000000 *................................* 0E504700
|
here
Back to top
View user's profile Send private message
mahesh_klm

New User


Joined: 26 Apr 2007
Posts: 1
Location: india

PostPosted: Wed May 08, 2013 9:53 pm
Reply with quote

Hi

I am getting an asra abend with below details
Information for enclave VTxxxxA

Information for thread 8000000000000000

Traceback:
DSA Entry E Offset Statement Load Mod Program Unit
1 CEEHDSP +0000421A CEEHDSP
2 CEECGEX +000001EE CEECGEX
3 VTxxxxA +000057BA VT9810A
4 IGZCFCC +000002BE IGZCFCC
5 VTxxxxA +000013DA VTXXXXA
6 CEECRINV +00000306 CEECRINV
7 CEECRINI +00000AFE CEECRINI

From all discuttions i can see we can get the abending instruction from offset. How can i get it in endevor?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu May 09, 2013 12:02 am
Reply with quote

I would concentrate on "sangiah's" assessment as it spells out mostly everything you need.

You will need a "Yellow Card" or an equivalent, because once you find the instruction address, you'll need to know the instruction type.

A popular and common failing decimal instruction (but not always) is a ZAP (OP code X'F8').
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 ABEND 0717 during starting IMS IMS DB/DC 0
No new posts MacKinney Batch to CICS upgrade causi... CICS 7
No new posts Associating a USERID with a CICS-Libe... CICS 0
No new posts omegamon for cics -UNSUPPORTED ENVIRO... CICS 2
No new posts Help needed in automation cics transa... CLIST & REXX 1
Search our Forums:

Back to Top