Beruflich Dokumente
Kultur Dokumente
other way - you dont have time to go to a class - you cant find a book on it (because
there are none) - youre 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 COBOL1 you can use the listing at the top of the next page.
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 dont have these, dont even
try to analyze the dump.
--------------------------------- Table of Contents ---------------------------------------------- Using Abendaid, how to find verb and data in the dump
COBOL Compile listing
ABENDAID dump
COBOL data types
3
4
7
11
Using Abendaid
Compile listing for COBOL-I
SOURCE NAME
INPUT-COUNTER
OUTPUT-COUNTER
BASE
BL=3
BL=3
DISPL DEFINITION
00C
DS 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
101 PERFORM
104 MOVE
3
A90
AF4
1
2
102 ADD
105 SUBTRACT
3
AAC
B10
1
2
3
103 PERFORM AD0
106 CLOSE
B2C
BASE
BLW=3
BLW=3
DISPL DEFINITION
00C
DS 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
101 PERFORM
104 MOVE
3
A90
AF4
1
2
102 ADD
105 SUBTRACT
3
AAC
B10
1
2
3
103 PERFORM AD0
106 CLOSE
B2C
DataDivisionMap
DataDefinitionAttributecodes(rightmostcolumn)havethefollowingmeanings:
D=ObjectofOCCURSDEPENDINGG=GLOBALS=Spannedfile
E=EXTERNALO=HasOCCURSclauseU=Undefinedformatfile
F=FixedlengthfileOG=GrouphasownlengthdefinitionV=Variablelengthfile
FB=FixedlengthblockedfileR=REDEFINESVB=Variablelengthblockedfile
SourceHierarchyandBaseHexDisplacementAsmblrDataData
LineIDDataNameLocatorBlkStructureDefinitionDataTypeAttr
2PROGRAMIDTEST1
4001HEADERLINE1...............BLW=0000000DS0CL132Group
4102FILLER.................BLW=00000000000000DS59CDisplay
4202FILLER..................BLW=000003B000003BDS7CDisplay
4302FILLER..................BLW=00000420000042DS10CDisplay
4402FILLER..................BLW=000004C000004CDS56CDisplay
4601COUNTERSALL................BLW=0000088DS0CL7Group
4702ALLEMPLOYEESDIVACC..........BLW=00000880000000DS3PPackedDec
4802EMPLOYEEACC...............BLW=000008B0000003DS2PPackedDec
4902PAGENUMACC..............BLW=000008D0000005DS2PPackedDec
5
LINE#HEXLOCVERBLINE#HEXLOCVERBLINE#HEXLOCVERB
0000530001D8DISPLAY0000540001E6MOVE0000550001ECADD
00006100020AGOBACK
***TGTMEMORYMAP***
TGTLOC
Endofcompilation1,programTEST1,nostatementsflagged.
Returncode0
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.
Youre on your own now. You know the verb and the data in question. Study the program to determine what
happened.
7
ABENDAID
PAGE
TUESDAY03FEB
*****************************************************************
*AbendAIDDiagnostics*
*Copyright(C)1976,1997,CompuwareCorporation.*
*UnpublishedRightsReservedUnderThe*
*CopyrightLawsOfTheUnitedStates.*
*****************************************************************
Model902XOPSYSMVS/SP5JobMYJOB01
CPFMIDCBA0010StepRUNIT
SystemS001Time14.25.13
DFSMS/MVSV1R2M0
JES2SP5
CompletionCodeS0C7
*******************************************
*NextSequentialInstructionSection*
*******************************************
Thenextsequentialinstructiontobeexecutedinprogram
TEST1wasatdisplacement000001FC.
Theprogramwascompiledon03FEBandis00000400byteslong.
ItispartofloadmoduleTEST1.
ThemodulewasloadedfromSTEPLIBlibrary
mytest.LOAD
Itwaslinkeditedon03FEBandis00000890byteslong.
ThelastknownI/Ooperationorcallwasissuedfromprogram
TEST1atdisplacement000001E6.
8
ABENDAID
PAGE2
SupportingEnvironmentalData
AbendPSW078D10008000696CA(TEST1)+000001FC
ProgPSW078D10008000696CA(TEST1)+000001FC
LoadModuleTEST1EntryPointAddress
00006770
ILC06,INTC07LoadPointAddress
00006770
Registersattimeoferror(Descriptionsbasedonresolutionas31bitaddresses)
**********************
*DiagnosticSection*
**********************
ADataExceptionwascausedbydatareferencedatdisplacement08B
fromthestartofBLWcell00(X'0').Thefieldcontains
X'5A5A'.Refertothedatadivisionmapintheprogramlistingto
locatethefieldname.
Thefieldcausingtheexceptionislocatedinatemporaryworkfield
intheTGT.TheactualfieldinerrorisinWorkingStorageof
programTEST1.
Becausetheprogramisreentrant,WorkingStorageislocatedoutside
oftheprogram.
ADataExceptioniscausedwhenacomputational3fieldhas
aninvaliddigit(not09),oritslastbytecontainsaninvalid
sign(notF,C,orD).
9
WorkingStorageSection
WorkingstoragereferencedbyBLWcell0(X'0')
DSPLAddressData
00000000480184040404040404040404040404040404040404040404040404040404040404040
0002000048038404040404040404040404040404040404040404040404040404040D7E4D9C5D3PUREL
0004000048058E840C6C9C3E3C9E3C9D6E4E24040404040404040404040404040404040404040Y
FICTITIOUS
00060000480784040404040404040404040404040404040404040404040404040404040404040
000800004809840404040000000005A5A5A5A5A5A5A
10
PIC XXX
Contains:
On keyboard?
Visible on screen, printer?
Math?
Examples:
ABC
Typical uses:
123
!23
PIC 9(5)
Contains:
0-9
On keyboard?
Visible on screen, printer?
yes
yes
Math?
Example:
123
Typical uses:
11
DISPLAY Decimal signed
COBOL Picture:
PIC S9(5)
Contains:
0-9
On keyboard?
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?
Typical uses:
12
Packed Decimal signed (all packed decimals should be signed)
COBOL Picture:
Contains:
On keyboard?
0-9
no
Math?
Typical uses:
13
Binary signed (all binary should be signed)
COBOL Picture
Contains:
On keyboard?
0-9
no
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?
Typical uses: