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

Question on Abend Analysis and Compiler Listing...


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 87
Location: US

PostPosted: Wed Apr 21, 2010 11:45 am
Reply with quote

Hi All,

Given below is a typical abend message -

+IDI0002I Module XXXXXXXX, program XXXXXXXX, offset X'EA4': Abend UXXXX (I believe this is the memory location that points to the section of code that was active. Is there concept like IP - Instruction Pointer, Frame Pointer, Stack Pointer etc. in mainframe?. Let me know if there is any documentation available on this. I am trying to relate it with Base in Windows which is usually 0X40000000).

In case we don't have the listing available for the code ABC, can I convert the offset to a location in the compiler listing, ABC.LST for the module (I can get the LST file from CHGMAN).

The abend UXXXX could happen at multiple locations in the module. This would help me know where it happened (I'm not sure about this statement since the X'EA4' shown would be the location where the abend routine got executed. This would not be sufficient to know from which part of the code and under what condition, the abend routine was called).

Bottomline, Is there any way to analyze in case there is no LISTING available for the module?.

Regards,
Sumesh
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 21, 2010 4:33 pm
Reply with quote

You need to learn the concept of PSW (Program Status Word) and the fields within it. You also need to go to www.redbooks.ibm.com and find manual SG24-7110, z/OS Diagnostic Data Collection and Analysis and read this manual.

It may be possible to debug the program without a listing but the listing makes it much easier.
Back to top
View user's profile Send private message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 87
Location: US

PostPosted: Wed Apr 21, 2010 7:12 pm
Reply with quote

Thanks a lot Robert!!!. I got the book. Will try to learn it icon_smile.gif.
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 Apr 21, 2010 7:21 pm
Reply with quote

Robert Sample wrote:
It may be possible to debug the program without a listing but the listing makes it much easier.
A dump and just backtracking from the abend point can reveal the source of the bad data, BTDT...grin.....
Back to top
View user's profile Send private message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 87
Location: US

PostPosted: Thu Apr 22, 2010 10:03 am
Reply with quote

Hi William,

I didn't quite understand what you were trying to convey (guess I didn't catch the lighter side of it icon_smile.gif ). Could you let me know how it is possible to backtrack the flow ?

Prog A

if A
else
call abend_routine

if B
else
call abend_routine

if C
else
call abend_routine
.
.
.


abend_routine (could be an assembler piece as shown below) -
PRGDUMP CSECT
SAVE (14,12)
BALR 11,0
USING *,11
ABEND XXXX,DUMP
END

In the above module, if we don't have compiler listing, it would just show the offset in prog A where the PRGDUMP got called?.

Now, with the data above, how can we know where exactly the call came from (backtracking) without the listing available?

Regards,
Sumesh
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Apr 22, 2010 12:01 pm
Reply with quote

In Sumesh's example, I will find it hard to do without a listing. You can do it by location the working storage data involved in the abended instruction.

But, if it is a programmed (intentional) abend, the programmer should have documented the condition and data that lead to the decision to abend the programme.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 22, 2010 12:17 pm
Reply with quote

Quote:
In case we don't have the listing available for the code ABC, can I convert the offset to a location in the compiler listing, ABC.LST for the module (I can get the LST file from CHGMAN).


just take a decision!
You have a listing or not ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 22, 2010 12:43 pm
Reply with quote

Quote:
The abend UXXXX could happen at multiple locations in the module.


a user abend should describe an abnormal situation,
irrelevant of where in the program the issue has been discovered

if the meaning is different depending on the location where the abend was issued,
then that' s a serious programming/logic mistake
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: Thu Apr 22, 2010 7:23 pm
Reply with quote

Hello,

If there are 3 different situations that could cause a user abend, there should be 3 different user abend values. . .

If there are 3 different situations that are permitted to cause the same user abend then there should be an additional working-storage entry that contains the information as to why the abend was caused. Before the ws entry that describes the abend, it helps to add an "eyecatcher" so that when looking at a dump, something "readable" is always there.
Back to top
View user's profile Send private message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 87
Location: US

PostPosted: Thu Apr 22, 2010 9:30 pm
Reply with quote

Thanks everyone for the replies :-)

@enrico

The listing I referred to is the LST file that is interpreted through CHGMAN. I think this gets created even if you havent provided LIST in Compile Option (not sure).

What I meant by "no listing" is that, since the module was not compiled with LST option, I will not have a listing for the particular module when it abends.

@dick

that should ideally be the case to understand based on any indicator set according to the location from which the abend routine was called. Unfortunately, this is not the case for me.

However, say I had an code C that would be 1, 2 or 3 according to the location, how will I know what is in C if I dont have a listing for the module at all?.

Regards,
Sumesh
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 22, 2010 9:41 pm
Reply with quote

We are just wasting time here!
if a Compiler and Linkage editor listings are not available
the chances for a reasonable debugging are close to 0

review You organization practices in order to have the proper info available at all time.

Furthermore if compile and linkage editor listing are not available Your organization
might not pass any reasonable audit ( seen it, done it )
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Apr 22, 2010 9:52 pm
Reply with quote

cybertaurean wrote:
Prog A

if A
else
call abend_routine

if B
else
call abend_routine

if C
else
call abend_routine
.
.
.


abend_routine (could be an assembler piece as shown below) -
Code:
PRGDUMP  CSECT         
         SAVE  (14,12) 
         BALR  11,0     
         USING *,11     
         ABEND XXXX,DUMP
         END           

Based upon your example:
The CALL should be a BALR 14,15 so look at R14 for the call.
You may need to look at the savearea pointed to by R13 to get R14.
Look backwards in the dump until you find the CLC/CLI followed by a BNE to the CALL.
Look backwards to find where the CLC/CLI got the objects for the compare, one should point to the 88 value of A or B or C and the other should point to the actual WS data area of the unknown.
The 88 value should tell you which IF did the CALL and the WS data will tell you why it failed the compare.
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: Thu Apr 22, 2010 10:04 pm
Reply with quote

Hello,

Quote:
Unfortunately, this is not the case for me.
Suggest this become the case. . . It is a matter of self-preservation icon_smile.gif

Quote:
how will I know what is in C if I dont have a listing for the module at all?.
If you have neither listing nor "eyecatcher", finding what is in "C" may be most difficult - if it is possible at all. . .
Back to top
View user's profile Send private message
cybertaurean

New User


Joined: 22 Dec 2008
Posts: 87
Location: US

PostPosted: Fri Apr 23, 2010 10:06 am
Reply with quote

Thanks everyone for the replies...

@enrico
The audit passed is the reason why the module is live. I guess we will have to reinstall using LIST option icon_smile.gif.

@william
I got a long way to go to reach your expertise icon_smile.gif. Guess, I will have to study assemblers now. However, is that enough?. Will I have to learn the architecture, addressing etc. besides learning assembler?

@dick
I had a walkthrough of the code and found that I am not completely lost here. I happened to find two values ABEND-PARAGRAPH and ABEND-STATUS. I located the BLW's for these fields and searched the hex-dump in Fault Analyzer and VOILA!!! I got the values. The abend was due to a missing segment (will analyze further to find the reason why this segment was not present;that's another story).

Bottomline is that I'm quite happy that I decided to stretch a bit and subsequently learned more.

Regards,
Sumesh
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: Fri Apr 23, 2010 7:14 pm
Reply with quote

Good to hear you found the problem icon_smile.gif

Quote:
I happened to find two values ABEND-PARAGRAPH and ABEND-STATUS.
Yup, a paragraph-name should certainly "catch the eye" icon_wink.gif

Thank you for posting what you found,

d
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
Search our Forums:

Back to Top