Home Programming Books for Computer Professionals Privacy Terms
           Home   > Programming   > Just Enough   > Just Enough Dump

Just Enough Dump

 

to be dangerous

 

 

 

 

 

 

:

Books (somewhat outdated) on abend debugging
If you are looking for MVS, OS/390, and Z/os abend codes, go here

 

 

 

Abend Tutorial/FONT>

The purpose of this tutorial is to get you started with dump analysis when there is no other way - you donít have time to go to a class - you canít find a book on it (because there are none) - youíre in a class on COBOL and your program bombs and produces a dump.

I assume you have the IBM COBOL-2 compiler and Abendaid. If you have only COBOL-1 you can use the listing at the top of the next page. If you donít have Abendaid you can use the short section on the old fashioned IBM dump.

You have to compile the program with the COBOL compiler options MAP and OFFSET. FLAG(W,W) is highly desirable too. You need the most recent program listing from the compile job that produced the program that abended. If you donít have these, donít even try to analyze the dump.

Wherever the booklet says Ďuseridí, replace it with your TSO userid. Be aware that some companies have messed around with normal naming conventions, and so youíll have to follow their standards.

----------------------------------------------- Table of Contents -----------------------------------------------

Scroll forward to the appropriate section.

Using Abendaid, how to find verb and data in the dump

COBOL Compile listing

ABENDAID dump

COBOL datatypes

Memorize this: EBCDIC Equivalencies

For Old Timeís Sake: Analyzing the Old IBM Dump

 

Using Abendaid

Compile listing for COBOL-I

Compile Options MAP,CLIST

Obtain Compile listing. Find part of listing that starts "INTRNL NAME" (Looks like this)

INTRNL NAME SOURCE NAME BASE DISPL DEFINITION

DNM=1-123 INPUT-COUNTER BL=3 00C DS 3

DNM=1-456 OUTPUT-COUNTER BL=3 00F DS 3P

Mark or note the base and displacement columns for COBOL data items.

 

Find part of listing that starts "CONDENSED LISTING" (Looks like this)

1 2 3 1 2 3 1 2 3

101 PERFORM A90 102 ADD AAC 103 PERFORM AD0

104 MOVE AF4 105 SUBTRACT B10 106 CLOSE B2C

Mark or note these on the listing:

1 the displacement of that verb

2 the COBOL verb

3 Source Statement number

 

Compile listing for COBOL-II (See next page)

Compile Options NOSSRANGE,MAP,OFFSET,NUMPROC(MIG) - unless installation prefers other.

Obtain Compile listing. Find part of listing that looks something like this, depending on version of compiler:

SOURCE NAME BASE DISPL DEFINITION

INPUT-COUNTER BLW=3 00C DS 3

OUTPUT-COUNTER BLW=3 00F DS 3P

Mark or note the base and DISPLacement columns for COBOL data items.

 

Find part of listing that looks more or less like this depending on version of compiler:

1 2 3 1 2 3 1 2 3

101 PERFORM A90 102 ADD AAC 103 PERFORM AD0

104 MOVE AF4 105 SUBTRACT B10 106 CLOSE B2C

Mark or note these on the listing:

1 Source Statement number

2 the COBOL verb

3 the displacement of that verb

COBOL Compile Listing

PP 5668-958 IBM VS COBOL II Release 4.0 09/15/92 Date 02/03/00Time 14:25:05 Page 1

000001 000100 IDENTIFICATION DIVISION.

000002 000200 PROGRAM-ID. TEST1.

000003 000800*

000004 000900 ENVIRONMENT DIVISION.

000005 001000 CONFIGURATION SECTION.

000006 001100*

000007 001500 INPUT-OUTPUT SECTION.

000008 001600 FILE-CONTROL.

000009 001700*

000013 002100 DATA DIVISION.

000014 002200 FILE SECTION.

000015 002300*

000039 005502*

000040 005503 01 HEADER-LINE-1. BLW=0000+000

000041 005504 05 FILLER PIC X(59) VALUE SPACES. BLW=0000+000,0000000

000042 005505 05 FILLER PIC X(07) VALUE 'PURELY '. BLW=0000+03B,000003B

000043 005506 05 FILLER PIC X(10) VALUE 'FICTITIOUS'. BLW=0000+042,0000042

000044 005508 05 FILLER PIC X(56) VALUE SPACES. BLW=0000+04C,000004C

000045 005560*

000046 006106 01 COUNTERS-ALL. BLW=0000+088

000047 006107 05 SAMPLE-ACC PIC 9(04) VALUE 0 USAGE COMP-3. BLW=0000+088,0000000

000048 006108 05 EMPLOYEE-ACC PIC 9(02) VALUE 1 USAGE COMP-3. BLW=0000+08B,0000003

000049 006109 05 PAGE-NUM-ACC PIC 9(03) VALUE 1 USAGE COMP-3. BLW=0000+08D,0000005

000050 006110*

000052 006500 PROCEDURE DIVISION.

000053 006510 DISPLAY 'PROGRAM TEST1'.

000054 006600 MOVE ALL '!' TO COUNTERS-ALL.

000055 006610 ADD 1 TO EMPLOYEE-ACC

000056 006620*

000057 006630*

 

Data Division Map

Data Definition Attribute codes (rightmost column) have the following meanings:

D = Object of OCCURS DEPENDING G = GLOBAL S = Spanned file

E = EXTERNAL O = Has OCCURS clause U = Undefined format file

F = Fixed length file OG= Group has own length definition V = Variable length file

FB= Fixed length blocked file R = REDEFINES VB= Variable length blocked file

Source Hierarchy and Base Hex-Displacement Asmblr Data Data

LineID Data Name Locator Blk Structure Definition Data Type Attr

2 PROGRAM-ID TEST1 ----------

40 01 HEADER-LINE-1 . . . . . . .. . . . . . . . BLW=0000 000 DS 0CL132 Group

41 02 FILLER. . . . . . . . . . . . . . . . . BLW=0000 000 0 000 000 DS 59C Display

42 02 FILLER. . . . . . . . . .. . . . . . . . BLW=0000 03B 0 000 03B DS 7C Display

43 02 FILLER. . . . . . . . . .. . . . . . . . BLW=0000 042 0 000 042 DS 10C Display

44 02 FILLER. . . . . . . . . .. . . . . . . . BLW=0000 04C 0 000 04C DS 56C Display

46 01 COUNTERS-ALL. . . . . . . .. . . . . . . . BLW=0000 088 DS 0CL7 Group

47 02 ALL-EMPLOYEES-DIV-ACC . .. . . . . . . . BLW=0000 088 0 000 000 DS 3P Packed-Dec

48 02 EMPLOYEE-ACC. . . . . . .. . . . . . . . BLW=0000 08B 0 000 003 DS 2P Packed-Dec

49 02 PAGE-NUM-ACC. . . . . . . . . . . . . . BLW=0000 08D 0 000 005 DS 2P Packed-Dec

LINE # HEXLOC VERB LINE # HEXLOC VERB LINE # HEXLOC VERB

000053 0001D8 DISPLAY 000054 0001E6 MOVE 000055 0001EC ADD

000061 00020A GOBACK

*** TGT MEMORY MAP ***

TGTLOC

End of compilation 1, program TEST1, no statements flagged.

Return code 0

Abendaid Dump

Finding the verb

Locate the part of the dump that states "next sequential instruction to be executed"

It will look like this: (see page 8)

next sequential instruction to be executed in program TEST1 was at displacement 1FC

Refer to the verb displacements in the compile listing. (page 6)

Find the highest displacement that is less than the one shown in the dump (AB0)

look at the displacements

1E6 is less than the one shown in the dump (1FC). Try the next higher one.

1EC is less than the one shown in the dump (1FC). Try the next higher one.

20A is greater than the one shown in the dump (1FC). Go back one.

1EC is the displacement you want. It is an ADD. Its source statement number is 55

Look at the compile listing to see the ADD verb in context. Note the data items that it affects.

Finding the offending data in 0C7 dumps.

Locate the part of the dump that states "a data exception was caused by data at displacement 08B from the start of BL cell 00" (page 9)

Refer to the compile listing (page 5) for the COBOL data item at displacement 08B at BL=0.

Youíre on your own now. You know the verb and the data in question. Study the program to determine what happened.

A B E N D - A I D PAGE

TUESDAY 03 FEB

*****************************************************************

* A b e n d - A I D D i a g n o s t i c s *

* Copyright (C) 1976, 1997, Compuware Corporation. *

* Unpublished - Rights Reserved Under The *

* Copyright Laws Of The United States. *

*****************************************************************

Model - 902X OPSYS - MVS/SP 5 Job - MYJOB01

CP FMID - CBA0010 Step - RUNIT

System - S001 Time - 14.25.13

DFSMS/MVS - V1R2M0

JES2 - SP 5

Completion Code - S0C7

*******************************************

* Next Sequential Instruction Section *

*******************************************

The next sequential instruction to be executed in program

TEST1 was at displacement 000001FC.

The program was compiled on 03 FEB and is 00000400 bytes long.

It is part of load module TEST1.

The module was loaded from STEPLIB library

mytest.LOAD

It was link edited on 03 FEB and is 00000890 bytes long.

The last known I/O operation or call was issued from program

TEST1 at displacement 000001E6.

A B E N D - A I D PAGE 2

 

 

Supporting Environmental Data

Abend PSW - 078D1000 8000696C A(TEST1 ) + 000001FC

Prog PSW - 078D1000 8000696C A(TEST1 ) + 000001FC

Load Module - TEST1 Entry Point Address - 00006770

ILC - 06, INTC - 07 Load Point Address - 00006770

Registers at time of error (Descriptions based on resolution as 31 bit addresses)

**********************

* Diagnostic Section *

**********************

A Data Exception was caused by data referenced at displacement 08B

from the start of BLW cell 00 (X'0'). The field contains

X'5A5A'. Refer to the data division map in the program listing to

locate the field name.

The field causing the exception is located in a temporary work field

in the TGT. The actual field in error is in Working-Storage of

program TEST1.

Because the program is re-entrant, Working-Storage is located outside

of the program.

A Data Exception is caused when a computational-3 field has

an invalid digit (not 0-9), or its last byte contains an invalid

sign (not F, C, or D).

Working-Storage Section

Working storage referenced by BLW cell 0 (X'0')

DSPL Address --------------------------------- Data ---------------------------------

00000 00048018 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040

00020 00048038 40404040 40404040 40404040 40404040 40404040 40404040 404040D7 E4D9C5D3 PUREL

00040 00048058 E840C6C9 C3E3C9E3 C9D6E4E2 40404040 40404040 40404040 40404040 40404040 Y FICTITIOUS

00060 00048078 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40404040

00080 00048098 40404040 00000000 5A5A5A5A 5A5A5A

Whatís that in the Dump?: COBOL Datatypes

This section will prepare you for the shock of seeing your programĎs data in the dump. The dump does not indicate in any way the datatype of what you are looking at. Get familiar with COBOL datatypes.

 

DISPLAY ALPHANUMERIC or Character

COBOL Picture: PIC XXX

Contains: all characters possible

On keyboard? Yes (most characters)

Visible on screen, printer? yes, but

some configurations not printable

Math? no

Examples: ABC 123 !23

Typical uses: Everything but arithmetic, subscripts, indexes

 

DISPLAY Decimal, unsigned

COBOL Picture: PIC 9(5)

Contains: 0 - 9

On keyboard? yes

Visible on screen, printer? yes

Math? yes, but slow

always positive, no matter what

Example: 123

Typical uses: Number fields typed in on keyboard

displayed on screen, printer

 

 

DISPLAY Decimal signed

COBOL Picture: PIC S9(5)

Contains: 0 - 9

On keyboard? yes but signed digit has to be entered as a letter

I'm not suggesting you do that!

Visible on screen, printer? yes but signed digit appears as a letter

In the final digit the sign + or - is merged with the number causing it to appear as a letter.

+54321 looks like 5432A

-54321 looks like 5432J

Note: +0 looks like {

-0 looks like a space

+2 looks like B

+9 looks like I

-2 looks like K

-9 looks like R

Math? yes, but slow

Typical uses: Hardly any justifiable

 

 

Packed Decimal signed (all packed decimals should be signed)

COBOL Picture: PIC S9(5) PACKED-DECIMAL length should be odd number

or

PIC S9(5) COMP-3

Contains: 0 - 9

On keyboard? no

Visible on screen, printer? no. looks very strange

in hex, +54321 looks like 54321C

Actual length in bytes

pic s9(5) comp-3 takes up 3 bytes

How to figure display length to packed length

divide by 2

drop decimal fraction

add 1

How to figure packed length to display length

Subtract Ĺ byte

double it (always gives an odd number)

Math? yes (fast)

Typical uses: Accumulators, counters, subscripts, money,

fields in program or files

Binary signed (all binary should be signed)

COBOL Picture PIC S9(4) BINARY

or

PIC S9(4) COMP

Contains: 0 - 9

On keyboard? no

Visible on screen, printer? no. looks very strange

in hex, 1 looks like 0 1

Actual length in bytes PIC S9(1) thru S9(4) gives a half word, I.E. two bytes

PIC S9(5) thru S9(9) gives a full word, I.E. four bytes

PIC S9(10) thru S9(18) gives a double word, I.E. eight bytes

Math? yes (real fast, provided itís loaded onto a word boundary)

Typical uses: Integer accumulators, counters, subscripts,

fields in files (not too common)

Memorize this: EBCDIC Equivalencies

As it appears What it prints as

in storage "HEX"

40 space

F0 0

F1 1

F2 2

F3 3

F4 4

F5 5

F6 6

F7 7

F8 8

F9 9

C1 A

C2 B

C3 C

C4 D

C5 E

C6 F

C7 G

C8 H

C9 I

D1 J

D2 K

D3 L

D4 M

D5 N

D6 O

D7 P

D8 Q

D9 R

E2 S

E3 T

E4 U

E5 V

E6 W

E7 X

E8 Y

E9 Z

For Old Timeís Sake: Analyzing the Old IBM Dump

1. Look at the dump

Notice the System Abend Code Sxxx-xx

2. Look up the System Abend Code using the Quick Reference (QW) product, an IBM manual

or your neighborís brain.

Determine the reason why MVS decided to terminate your program

In the example, this is a decimal data exception.

3. Note: Sx22 type abends happen when MVS decides to terminate your program

because a system limit was exceeded (time, CPU, wait, print lines)

You may be able to determine something by looking through the dump, but probably not.

4. User abends are not always in shown in documentation.

The dump may not be useful in the case of user abends.

5. See the dump.

Notice the abend offset. This is a hex number.

6. See the dump.

Notice the load module name, where it says NAME=

7. Is the load module name the same as your program?

that is:

JCL EXEC PGM=load module name

DB2 RUN PROGRAM(load module name)

Yes - continue

No - get the program compile listing for the right program

8. [if you have the short verb offset listing: parm: OFFSET]

See the verb offsets in the compile listing 1

Search for the word "hexloc"

Look for the abend offset

You will rarely find it!

If you find it, move back one verb (to the left)

If you donít find it, find the verb offset nearest to the abend offset, but lower than the

abend offset.

The line number of the statement that abended is shown. Refer to the program listing to see what happened.

 

 

8. [if you have the long assembler listing: parm: LIST]

See the assembler language listing

Locate the verb with the same offset as the abend offset.

It will be there, so you will find it.

Move up, to the COBOL verb above.

Notice the source line number.

9. Find the source line determined in 8.

This is the line of the program that abended

10. Say goodbye to the dump.

 

About this series.

Sometimes you need just enough information so that you can do something - it gets you started when you donít have time to learn everything. Get all the others in the series at: Justenuf Other Books for professionals: REXX Reference All REXX verbs, keywords, and built-in functions as found in MVS, VM/CMS and OS/2. Order from MVS Training (800) 356 9093.MVS Training The REXX Language on TSO How to use REXX on TSO. Information, ordering at: REXX ISPF Services: Using the Dialogue Manager with REXX How to create ISPF panels on TSO. Examples in REXX. Information, ordering at:ISPF Services Youíll find manuals on TSO, JCL, REXX, COBOL, DB2 at:Manuals.