Transaction
Debugging Using
Dumps
Noel Javier C. Sales
Software Engineer zCICS
Development
2009 IBM Corporation
Contents
Analyzing a transaction dump
ASRA abend cookbook
Locating the failure
Finding the last EXEC CICS command
Cookbook to locate storage fields
Locating relevant data
Cookbook to locate information involved in a link
Fault Analyzer overview
Analyzing a transaction dump with Fault Analyzer
Transaction dump table
Printing transaction dumps
2009 IBM Corporation
Introduction
This presentation demonstrates the methodology for diagnosing a
program check (abend ASRA) in a CICS COBOL application.
A similar approach may be taken when dealing with abends in
applications written in other languages supported by CICS, e.g.
Assembler or PL1.
The presentation shows how to approach the failure using CICS
diagnostic data, coupled with COBOL storage contents and
program listing information...
The presentation also shows the ways that Fault Analyzer can be
used to assist with problem determination
2009 IBM Corporation
Why COBOL?
Y2K demonstrated that the COBOL programming language is still
very pervasive
Very many COBOL programs have been developed over the years,
and inherited by different programmers from those who wrote them
initially
An application maintenance policy requires problem determination
skills and techniques
Straw poll - how many sites have the need for COBOL experience?
2009 IBM Corporation
Using CICS Transaction Dumps
Use the transaction dump to locate:
The point of failure
PSW address
The failing module
The failing instruction
The last EXEC CICS command
Relevant data areas
Called program information
Linking program information
2009 IBM Corporation
Dump analysis
Problem determination analysis is a skill like any other
It requires time, experience, and education in order to be successful
Knowing how to approach a CICS dump is a useful skill to possess
Once you appreciate dump content, format, etc, it is a good grounding
on how to approach CICS (and application) problems in the future
This presentation includes a manual approach to dump analysis
There are tools and products available to assist in problem determination
For example, IBMs Fault Analyzer providing transaction dump and
system dump analysis
Fault Analyzer gets control through exits at abend time
Transaction abends are analyzed in real time and a report produced
Abend information can be saved in a history file for later analysis
The presentation also includes a review of using Fault Analyzer for transaction
dumps
2009 IBM Corporation
Traditional ways to analyze CICS dumps
CICS generates two types of dump:
Transaction dumps (when a specific CICS task abends, or requests a
dump)
System dumps (SDUMPs), when the CICS region itself is dumped
CICS supplies a batch program for transaction dump formatting
DFHDU650 (for CICS TS 3.2)
IPCS is provided by z/OS for SDUMP analysis
IPCS has both an ISPF interaction, and a batch interface
It analyses the dump and formats out key state data and control blocks
It allows products to provide dump formatting exits for their own control
blocks
CICS provides a VERBEXIT for IPCS SDUMP formatting
e.g. VERBX DFHPD650 KE
DFHDU650 and IPCS are static formatters (no dynamic navigation)
2009 IBM Corporation
ASRA Abend Cookbook
FROM THE DUMP...
1.Determine the type of program check that occurred.
Read in CICS Problem Determination Guide for possible causes.
2. Review the information in the Transaction Environment.
3. Review the exception trace entries at abend. Pay particular attention to the full
trace, as well as the last EXEC CICS command prior to the failure.
4. Note the PSW address and the failing instruction length.
5. Determine the offset of the failing instruction:
Use CESE output
Refer to DFHAP0001 message and subtract the stub length
Look at OFFSET on *EXC trace entry and subtract stub length
Calculate the offset: Subtract the entry point address from the PSW, then
subtract the failing instruction length from this
6. Calculate the offset of the last EXEC CICS command (Register 14).
Subtract the program's entry point address from the Register 14 address to
determine the offset into the program of the last statement executed.
10
2009 IBM Corporation
ASRA Abend Cookbook (continued)
PROGRAM LISTING - Equating an offset to an instruction:
1. Once an offset is obtained, refer to the offset table in the program
listing.
2. Using the offset table, locate the first hex location larger than the
offset obtained.
3. Back up to the previous verb. This is the actual statement you
want to review. NOTE THE LINE NUMBER.
Hint. If you are looking for an offset that is register 14 or an EXEC
CICS command, the verb in the offset table should be a CALL.
4. Refer to the compile output portion of the program listing to
locate the corresponding line number. Here you should have the
COBOL statement that relates to the offset obtained from the dump.
5. If the abend is not obvious, follow the "Cookbook to locate
storage fields".
11
2009 IBM Corporation
Locate the Point of Failure PSW and registers
ES37CICS
--- CICS TRANSACTION DUMP ---
CODE=ASRA
TRAN=PAYR
ID=1/0005
SYMPTOMS= AB/UASRA PIDS/565501800 FLDS/DFHABAB RIDS/PAYPGM1
PSW & REGISTERS AT TIME OF INTERRUPT
PSW
078D0000
8CB04E80
00060004
00000000
REGS 0-7
REGS 8-15
0C410590
0C410F18
0C40F378
0C410450
0C411160
0CB04C50
0CB04E0C
0CB04D1C
0CB04B78
0CB04C3C
00000000
0C40F2E0
00000000
8CB04E5E
0C4111B0
00000000
0C40F378
0C410450
0C4111B0
0CB04C50
0CB04E0C
0CB04D1C
0CB04B78
0C40CDB0
00000000
0C40F2E0
00000000
8CB04E5E
0C4111B0
00000000
REGISTERS AT LAST EXEC COMMAND
REGS 0-7
REGS 8-15
12
0C410590
0C410F18
2009 IBM Corporation
Locate the Point of Failure transaction info
Transaction environment for transaction_number(0000035)
transaction_id(PAYR)
orig_transaction_id(PAYR)
initial_program(PAYMENU ) current_program(PAYPGM1 )
facility_type(TERMINAL)
facility_name(DYPG)
Start_code(TP)
netname(IBMXDYPG)
profile_name(DFHCICST)
userid(CICSUSER)
cmdsec(NO)
ressec(NO)
spurge(NO)
dtimeout(4769679)
tpurge(NO)
taskdatakey(USER)
taskdataloc(ANY)
twasize(00000)
twaaddr(
)
remote(NO)
dynamic(NO)
priority(001)
Tclass(NO)
runaway_limit(0020000)
indoubt_wait(YES)
indoubt_wait_mins(000000)
indoubt_action(????)
cics_uow_id(C01C2CABB379EEE02)confdata(NO)
system_transaction(NO)
restart_count(00000)
restart(NO)
13
2009 IBM Corporation
Locate the Point of Failure - abbreviated trace
00035
00035
00035
00035
00035
QR
QR
QR
QR
QR
AP
TS
AP
AP
AP
00E1
0201
00E1
1942
0781
EIP
TSQR
EIP
APLI
SRP
ENTRY
ENTRY
EXIT
*EXC*
*EXC*
WRITEQ-TS
0004,0C40F2E0 . 2\,08000A02 ....
=000113=
WRITE
CALC,0C410F18 , 0000000C,YES,MAIN,EXEC
=000114=
WRITEQ-TS
OK
00F4,00000000 ....,00000A02 ....
=000118=
Program-CheckSTART_PROGRAM,PAYPGM1,CEDF,FULLAPI,EXEC,NO,0C3478A0,0C409C50 , 0000007,2*=000119=
ABEND_ASRA
PAYPGM1,FFFFFFFF,CICS
=000127=
Reviewing the Trace Entries prior to the Abend
The (edited) Trace Entries show that the transaction (task number 35) had issued an EXEC CICS WRITEQ
command to CICS Temporary Storage.
Control returned from CICS to the application (as shown by the EIP EXIT Trace Entry). The next trace entry shows
an Exception Trace event (*EXC*) issued by CICS module DFHAPLI. This shows that a Program Check was
detected. CICS passes control to the System Recovery Program (DFHSRP) and this issues a further *EXC* trace
showing the Abend ASRA.
Since the EIP EXIT trace call showed that control returned from CICS at this point, we know the abend occurred
whilst not in CICS code.
For further information, Full Trace rather than Abbreviated can be used...
14
2009 IBM Corporation
Locate Point of Failure - full trace
Reviewing the relevant Trace Entries using Full Trace
AP 00E1 EIP ENTRY WRITEQ-TS
TASK-00035 KE_NUM-002B TCB-QR
REQ(0004) FIELD-A(0C40F2E0 . 2\) FIELD-B(08000A02 ....)
/0069C168 RET-8CB04E5E TIME-05:28:48.6413453754 INTERVAL-00.0001408750
=000113=
AP 00E1 EIP EXIT WRITEQ-TS OK
TASK-00035 KE_NUM-002B TCB-QR
REQ(00F4) FIELD-A(00000000 ....) FIELD-B(00000A02 ....)
/0069C168 RET-8CB04E5E TIME-05:28:48.6414570004 INTERVAL-00.0000125000
=000118=
AP 1942 APLI
*EXC* - Program-Check
FUNCTION(START_PROGRAM) PROGRAM(PAYPGM1) CEDF_STATUS(CEDF) EXECUTION_SET(FULLAPI)
ENVIRONMENT_TYPE(EXEC) SYNCONRETURN(NO) LANGUAGE_BLOCK(0C3478A0) COMMAREA(0C409C50 , 00000007) LINK_LEVEL(2)
SYSEIB_REQUEST(NO)
TASK-00035 KE_NUM-002B TCB-QR
/0069C168 RET-8BF7FE5C TIME-05:28:48.6692091254 INTERVAL-00.0277521250* =000119=
1-0000 00580000 000000DA 00000000 00000000 B81B5D40 00000000 02000100 D7C1E8D7 *.................) ........PAYP*
0020 C7D4F140 0C3D9EA0 0C3D4A50 063D9E01 00000001 01B00202 0CB01E30 0C3478A0 *GM1 ......$&...................*
0040 00002CE8 00000000 0C409C50 00000007 00020002 02020000
*...Y..... .&...........
*
2-0000 F0C3F461 C1D2C5C1 018400C4 0000FFFF C4C6C8C1 D7D3C9F1 0C003F10 0BDA7080 *0C4/AKEA.d.D...DFHAPLI1........*
0020 0BE77680 0C336400 00000004 00000004 FF850004 00000000 078D0000 8CB04E80 *.X..............e..............*
0040 00060004 00000000 8CB04E80 80000000 0C410590 0C40F378 0C411160 0CB04E0C *..........+......... 3....-..+.*
0060 0CB04B78 00000000 00000000 0C4111B0 0C410F18 0C410450 0CB04C50 0CB04D1C *......................&..<&..(.*
0080 0CB04C3C 0C40F2E0 8CB04E5E 00000000 006FB01F 00000002 00000000 00000000 *..<.. 2\..+;....?..............*
AP 0781 SRP
*EXC* - ABEND_ASRA PROGRAM(PAYPGM1 ) OFFSET(FFFFFFFF) EXEC_KEY(CICS)
TASK-00035 KE_NUM-002B TCB-QR
/0069C168 RET-8BE60322 TIME-05:28:48.6694091254
1-0000 D7C1E8D7 C7D4F140 F0C3F461 C1D2C5C1 FFFFFFFF 00030781
2-0000 00
3-0000 F0C3F461 C1D2C5C1 018400C4 0000FFFF C4C6C8C1 D7D3C9F1 0C003F10 0BDA7080
0020 0BE77680 0C336400 00000004 00000004 FF850004 00000000 078D0000 8CB04E80
0040 00060004 00000000 8CB04E80 80000000 0C410590 0C40F378 0C411160 0CB04E0C
0060 0CB04B78 00000000 00000000 0C4111B0 0C410F18 0C410450 0CB04C50 0CB04D1C
0080 0CB04C3C 0C40F2E0 8CB04E5E 00000000 006FB01F 00000002 00000000 00000000
15
INTERVAL-00.0000113750
=000127=
*PAYPGM1 0C4/AKEA......a
*
*.
*
*0C4/AKEA.d.D...DFHAPLI1........*
*.X..............e............+.*
*..........+......... 3....-..+.*
*......................&..<&..(.*
*..<.. 2\..+;....?..............*
2009 IBM Corporation
Locate the Point of Failure - the PSW
Relating a PSW to a Load Module
PSW & REGISTERS AT TIME OF INTERRUPT
PSW
078D0000
8CB04E80
00060004
0BB45C00
|
|
|
|
|
|
|
|
-----------------------> Interrupt code
|
|
|
--------------------> Instruction Length
Address of next instruction
to be executed
PROGRAM INFORMATION FOR THE CURRENT TRANSACTION
Number of Levels 00000002
INFORMATION FOR PROGRAM AT LEVEL 00000002 of 00000002
Program Name
PAYPGM1
Invoking Program PAYMENU
Load Point
0CB01E30
Program Length
00002CE8
Entry Point
8CB01E50
Addressing Mode AMODE 31
Language Defined Unknown
Language Deduced Unknown
Commarea Address 0C409C50
Commarea Length 00000007
Execution Key
USER
Data Location
ANY
Environment
User application
Adding the program length to the Load Point address gives an address of
0CB04B18. Yet - this is lower than the PSW address. This means the
abend must have occurred outside the current program, as known to CICS.
16
2009 IBM Corporation
Locate the Point of Failure - the load module
Relating a PSW to a Load Module (continued)
LOAD LIST ELEMENT
Program Name
BONUSCK
Entry Point
00000000
0C369070 0BE99088 0C3D4978 8CB04B40
----- MODULE INDEX ----LOAD PT.
NAME
ENTRY PT
0C2CC790 DFHCRR
0C2CC7B0
0C2D1000 DFHZATS
0C2D1028
0C2D4220 DFHZXST
0C2D4240
0C2D6660 DFHZNAC
0C2D6680
0C2E0AA0 DFHZXRE
0C2E0AC0
0C2E18B0 DFHZATA
0C2E18D8
0C2E6150 DFHQRY
0C2E6190
LENGTH
000012B0
00003218
00002438
0000A438
00000E08
000048A0
00000F00
8CB04B40
*.....Z.h.......
LOAD PT.
0C7E60A0
0C9D8000
0CA00000
0CA66000
0CB00000
0CB01E30
0CB04B20
NAME
DFHEITMT
DFHAMP
CEEEV007
DFHEMTD
PAYMENU
PAYPGM1
BONUSCK
ENTRY PT
0C7E60A0
0C9D8020
0CA00000
0CA66028
0CB00020
0CB01E50
0CB04B40
0C369160
LENGTH
00009950
000243A0
00065828
00018450
00001E28
00002CE8
000019B8
Using the Load List Elements, a program can be found that has an entry point just prior to the PSW address.
Using this information with the Module Index from the dump, it can be seen that program BONUSCK has a Load Point and
Program Length that cover the address where the PSW is pointing. This shows that BONUSCK was in control when
the abend ASRA occurred...
PSW address CB04E80 - CB04B40 (BONUSCK entry point address) = 340.
340 - 6 (instruction length) = 33A. Therefore, the abend occurred at X'33A' in program BONUSCK.
17
2009 IBM Corporation
Locate Point of Failure - msgs and *EXC* trace
Quick methods to locate the Failing Offset
FROM THE TRACE TABLE
AP 0781 SRP *EXC* - ABEND_ASRA PROGRAM(PAYPGM1 ) OFFSET(FFFFFFFF) EXEC_KEY(CICS)
TASK-00035 KE_NUM-002B TCB-QR
/0069C168 RET-8BE60322 TIME-05:28:48.6694091254
1-0000 D7C1E8D7 C7D4F140 F0C3F461 C1D2C5C1 FFFFFFFF 00030781
2-0000 00
3-0000 F0C3F461 C1D2C5C1 018400C4 0000FFFF C4C6C8C1 D7D3C9F1 0C003F10 0BDA7080
0020 0BE77680 0C336400 00000004 00000004 FF850004 00000000 078D0000 8CB04E80
0040 00060004 00000000 8CB04E80 80000000 0C410590 0C40F378 0C411160 0CB04E0C
0060 0CB04B78 00000000 00000000 0C4111B0 0C410F18 0C410450 0CB04C50 0CB04D1C
0080 0CB04C3C 0C40F2E0 8CB04E5E 00000000 006FB01F 00000002 00000000 00000000
00C0 00000000 00000000 806FA03C 00000001 FF850004 00000000 078D0000 8CB04E80
00E0 00060004 00000000 8CB04E80 80000000 0C410590 0C40F378 0C411160 0CB04E0C
0100 0CB04B78 00000000 00000000 0C4111B0 0C410F18 0C410450 0CB04C50 0CB04D1C
0120 0CB04C3C 0C40F2E0 8CB04E5E 00000000 006FB01F 00000002 00000000 00000000
INTERVAL-00.0000113750
=000127=
*PAYPGM1 0C4/AKEA.......a
*
*.
*
*0C4/AKEA.d.D....DFHAPLI1........*
*.X...............e............+.*
*..........+.......... 3....-..+.*
*.......................&..<&..(.*
*..<.. 2\..+;.....?..............*
*.........?.......e............+.*
*..........+.......... 3....-..+.*
*.......................&..<&..(.*
*..<.. 2\..+;.....?..............*
CICS SYSTEM LOG
+DFHAP0001 ES37CICS An abend (code 0C4/AKEA) has occurred at offset X'FFFFFFFF' in module PAYPGM1.
CICS TD QUEUE- CEEMSG.
CEE3204S The system detected a protection exception.
From compile unit BONUSCK at entry point BONUSCK at compile unit offset +0000033A at address 0CB04E7A.
To obtain the correct offset if using the DFHAP0001 message or trace the program stub size and the length of the bad instruction must be subtracted from the offset.
The COBOL stub size is the difference between the entry and load points. In this particular case, the offset is shown as x'FFFFFFFF', indicating CICS was not
able to determine the failing program, as a dynamic call had taken place.
18
2009 IBM Corporation
The Last EXEC CICS Command (R14)
PSW and registers...
PSW & REGISTERS AT TIME OF INTERRUPT
REGS 0-7
0C410590
0C40F378
0C411160
0CB04E0C
0CB04B78
00000000
00000000
0C4111B0
REGS 8-15
0C410F18
0C410450
0CB04C50
0CB04D1C
0CB04C3C
0C40F2E0
8CB04E5E
00000000
REGISTERS AT LAST EXEC COMMAND
REGS 0-7
0C410590
0C40F378
0C4111B0
0CB04E0C
0CB04B78
00000000
00000000
0C4111B0
REGS 8-15
0C410F18
0C410450
0CB04C50
0CB04D1C
0C40CDB0
0C40F2E0
8CB04E5E
00000000
Trace Entries for Dumping Transaction...
AP 00E1 EIP EXIT WRITEQ-TS OK
TASK-00035 KE_NUM-002B TCB-QR
REQ(00F4) FIELD-A(00000000 ....) FIELD-B(00000A02 ....)
/0069C168 RET-8CB04E5E TIME-05:28:48.6414570004 INTERVAL-00.0000125000
=000118=
AP 1942 APLI *EXC* - Program-Check
FUNCTION(START_PROGRAM) PROGRAM(PAYPGM1) CEDF_STATUS(CEDF) EXECUTION_SET(FULLAPI)
ENVIRONMENT_TYPE(EXEC) SYNCONRETURN(NO) LANGUAGE_BLOCK(0C3478A0) COMMAREA(0C409C50 , 00000007)
LINK_LEVEL(2)SYSEIB_REQUEST(NO)
19
2009 IBM Corporation
The Last EXEC CICS Command (R14) continued
Control blocks for the dumping transaction...
TASK CONTROL AREA (SYSTEM
000000 00000000 00000000
000020 00000000 00000000
000040 0C40F2E0 00000000
AREA) --- TCAPCHS is at offset X'40'
00000000 00000000 0000035C 0BDC9EE4 00000042 00000000
00000000 00000000 00000000 00000000 0C33E720 00000000
00000000 00000000 00000000 00000000 00000000 00000000
TRANSACTION STORAGE-USER31
004760
004780
0047A0
0047C0
00000000
00000000
0C4111B0
00000000
00000000
0C410590
0C410F18
00000000
ADDRESS 0C40AB70 TO 0C411D5F
00000000
0C40F378
0C410450
0C40F2E0
----- MODULE INDEX ----LOAD PT.
NAME
ENTRY PT
0C2D6660 DFHZNAC
0C2D6680
0C2E0AA0 DFHZXRE
0C2E0AC0
0C2E18B0 DFHZATA
0C2E18D8
0C2E6150 DFHQRY
0C2E6190
00000000
0C4111B0
0CB04C50
0C410450
LENGTH
0000A438
00000E08
000048A0
00000F00
00104001
0CB04E0C
0CB04D1C
00000000
LOAD PT.
0CA66000
0CB00000
0CB01E30
0CB04B20
0C40EFD8
0CB04B78
0C40CDB0
00000000
NAME
DFHEMTD
PAYMENU
PAYPGM1
BONUSCK
00000000
00000000
00000000
00000000
ENTRY PT
0CA66028
0CB00020
0CB01E50
0CB04B40
*...................*...U........*
*..........................X.....*
*. 2.............................*
BE77780
BE777A0
BE777C0
LENGTH 000071F0
8CB04E5E
00000000
0C40F3A8
00000000
*.................. .. .Q......+;*
*......... 3.......+.............*
*..............<...(.. ....... 3y*
*......... 2.....................*
C40F2D0
C40F2F0
C40F310
C40F330
LENGTH
00018450
00001E28
00002CE8
000019B8
Register 14 in any case is equal to 0CB04E5E. This address also falls into
program BONUSCK whose entry point is 0CB04B40. Subtracting the entry point
from Register 14, we get an offset of 31E.
20
2009 IBM Corporation
Locate Instructions using the program offset
The offset table
in the program
listing
LINE #
Relate the offset
to the actual
compile line
000019
000055
000056
000057
000058
000059
000060
000061
000062
000063
000064
000065
000066
000067
000068
000069
000070
000071
000072
000073
000074
000075
000076
000077
21
HEXLOC
VERB
LINE #
HEXLOC
VERB
LINE #
HEXLOC
VERB
000067 0002D6 MOVE
000079 000340 IF
000068
000080
0002DC
00035E
CALL
MOVE
000075
000083
00032A
000364
DIVIDE
GOBACK
LINKAGE SECTION.
01 PAYPASS.
10 BONI-CHECK
10 SALARY-CK
01 PAYCALC.
10 MONTHLY-SALARY
PIC 9(7).
PIC S9999999V99 USAGE COMP-3.
PIC S999999V99
USAGE COMP-3.
BLL=0003+000
BLL=0003+000
BLL=0003+007
BLL=0004+000
BLL=0004+000
*
PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA PAYPASS.
*
CALCULATE-BONUS.
*EXEC CICS WRITEQ TS QUEUE('CALC')
*
FROM(PAYPASS) MAIN
*END-EXEC.
Move length of PAYPASS to dfhb0020
Call 'DFHEI1' using by content x'0a02e0000700004900f0f0f0f2f5
'404040' by content 'CALC
' by reference PAYPASS by
reference dfhb0020 end-call.
*
* CALCULATE MONTHLY SALARY
*
DIVIDE SALARY-CK BY 12 GIVING MONTHLY-SALARY.
*
* IF BONUS AMOUNT IS LARGER THAN MONTHLY SALARY THEN ERROR
2009 IBM Corporation
Locate Instructions Using Offset (continued)
The PSW address points to the instruction at offset X'33A'. Looking at
the 'HEXLOC' column, 340 is the first offset larger than 33A. Backing up
to the previous verb, we see that #75 is the line number where the failure
occurred (PSW calculated offset).
The Register 14 calculated offset is 31E. Following the same procedure
above, we see that the VERB is a CALL and the COBOL line number is
68. Backing up to the first outdented statement, we see that an EXEC
CICS WRITEQ TS command was issued.
22
2009 IBM Corporation
ASRA Abend Cookbook worksheet
FROM THE DUMP...
1. Determine the type of program check that occurred.
An 0C4 occurred. This is a protection exception problem.
2. Review the information in the Transaction Environment.
Transaction environment shows the current program, userid, how envoked, etc.
3. Review the exception trace entries.
The exception trace entry showed that an ASRA 0C4 occurred.
The offset calculated was not a good one, it was FFFFFFFF.
The last EXEC CICS command was an EXEC CICS WRITEQ TS.
CICS suspected that the program in control at the time of the failure was PAYPGM1.
4. Note the PSW address and failing instruction length.
The PSW address was CB04E80 and the failing instruction length was 6.
5. Locate the offset of the failing instruction.
Subtract the entry point address from the PSW address.
Entry point of CB04B40 subtracted from PSW address CB04E80 gives an offset of 340.
Subtract the assembler instruction length from the answer above.
6 (on PSW line - interrupt information) subtracted from 340 gives 33A.
6. Calculate the offset of the last EXEC CICS command (Register 14).
Subtract the entry point address from the R14 address
Entry point of CB04B40 subtracted from R14 CB04E5E gives an offset of 31E.
23
2009 IBM Corporation
ASRA Abend Cookbook worksheet (continued)
FROM THE PROGRAM LISTING...
1. Using the offset table, locate the first hexloc larger than the offset obtained for the PSW
and register 14.
2. PSW offset of 33A.
The first hexloc larger than 33A is 340.
3. Back up to the previous COBOL verb. This is the failing statement. Note the LINE #.
Backing up to the previous verb, we see the line number is 75.
4. Refer to the compile listing of the program to locate the corresponding line number.
The statement where the abend occurred is 'DIVIDE SALARY-CK BY 12 GIVING
MONTHLY-SALARY'.
5. Register 14 offset is 31E.
The first hexloc larger than 31E is 32A.
6. Back up to the previous COBOL verb. This is the last EXEC CICS statement. Note the
LINE # of 68.
7. Refer to the compile listing of the program to locate the corresponding line number. For
a CICS command, look back up at the first "out-dented" line to see the actual command.
The last EXEC CICS statement was EXEC CICS WRITEQ TS QUEUE('CALC')
FROM(PAYPASS) MAIN END-EXEC.
8. If the abend is not obvious, follow the "Cookbook to locate storage fields".
24
2009 IBM Corporation
Locating Relevant Data Areas
COBOL has two types of data areas:
Working storage
Data items are in contiguous storage
Storage is pre-allocated
Addressed by Base Locator cells (BLW or BL)
Linkage section
Storage passed to a program
Storage acquired by a program
Addressed by Base Locator (BLL)
Each 01 level is addressed by a different BLL cell
Base locator cells reside in the COBOL Task Global Table (TGT).
25
2009 IBM Corporation
Checklist to find TGT address (COBOL for z/OS)
Approach 1
Use Register 9 address from 'REGISTERS AT TIME OF INTERRUPT' or from
'REGISTERS AT LAST EXEC COMMAND'
Approach 2
Record Register 13 address from 'REGISTERS AT TIME OF INTERRUPT' or from
'REGISTERS AT LAST EXEC COMMAND'
Add 5C to this address. Go there in the dump. At that storage location will be an address
that is the TGT address.
Approach 3
Go to the trace table. Look for an EXEC CICS command that your program issued (EIP
ENTRY). Write down the Field A address.
Add 5C to this address. Go there in the dump. At that storage location will be an address
that is the TGT address.
Approach 4
Obtain the address in field TCAPCHS (from the System TCA)
Add 5C to this address. Go there in the dump. At that storage location will be an address
that is the TGT address.
Approach 5
If the LE run-time option TRMTHDACT=UADUMP is set, look at the CEEMSG output.
The TGT address will be identified.
26
2009 IBM Corporation
Finding the TGT Address in a Dump...
Approach 1 and 2:
PSW & REGISTERS AT TIME OF INTERRUPT
PSW
REGS 0-7
REGS 8-15
078D0000
0C410590
0C410F18
8CB04E80
0C40F378
0C410450
00060004
0C411160
0CB04C50
00000000
0CB04E0C
0CB04D1C
0CB04B78
0CB04C3C
00000000
0C40F2E0
00000000
8CB04E5E
0C4111B0
0000000
Approach 3:
== TRACE ENTRIES FOR DUMPING TRANSACTION ==
00035 QR
AP 00E1 EIP
ENTRY WRITEQ-TS
0004,0C40F2E0. 2\,08000A02 ....
=000113=
AP 00E1 EIP ENTRY WRITEQ-TS
REQ(0004) FIELD-A(0C40F2E0 . 2\) FIELD-B(08000A02 ....) TASK-00035 KE_NUM-002B TCB-QR
/0069C168
RET-8CB04E5E TIME-05:28:48.6413453754 INTERVAL-00.0001408750 =000113=
Approach 4:
TASK CONTROL AREA (SYSTEM AREA)
000000
000020
000040
TCAPCHS is at offset X'40' (pointer to high level save area)
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
0C40F2E0 00000000 00000000 00000000
0000035C 0BDC9EE4 00000042 00000000
00000000 00000000 0C33E720 00000000
00000000 00000000 00000000 00000000
*.................*...U........*
*........................X.....*
*. 2...........................*
0BE77780
0BE777A0
0BE777C0
Approach 2 and 4:
TRANSACTION STORAGE-USER31
000000
004720
004780
0047A0
0047C0
27
E4F0F0F0
C2D6D5E4
00000000
0C4111B0
00000000
F0F0F3F5
E2C3D240
0C410590
0C410F18
00000000
00000000
81000000
0C40F378
0C410450
0C40F2E0
ADDRESS 0C40AB70 TO 0C411D5F
00000000
0C40F288
0C4111B0
0CB04C50
0C410450
00000000
0C40F89C
0CB04E0C
0CB04D1C
00000000
8C00ABA8
94000000
0CB04B78
0C40CDB0
00000000
00026B98
0C40F288
00000000
00000000
00000000
LENGTH 000071F0
0BC4B418
00000000
00000000
0C40F3A8
00000000
*U0000035...............y..,q.D..*
*BONUSCK a.... 2h. 8.m.... 2h....*
*......... 3.......+.............*
*..............<...(.. ....... 3y*
*......... 2....... ...........30*
0C40AB70
0C40F290
0C40F2F0
0C40F310
0C40F330
2009 IBM Corporation
Finding the TGT Address (continued)
Approach 5:
CESEMSG OUTPUT (TRMTHDACT=UADUMP)
Information for enclave PAYPGM1 called by enclave PAYMENU
Program BONUSCK was compiled 02/05/03 5:00:31 AM
TGT for BONUSCK: 0C410450
Program PAYPGM1 was compiled 02/05/03 2:52:01 AM
TGT for PAYPGM1: 0C410BC0
Storage and control blocks for non-active routines:
TGT for PAYMENU : 0C4099F0
28
2009 IBM Corporation
Cookbook to Locate Storage Fields
From the compile listing for the program
1. Go to the Data Division Map and note the following:
The Field you wish to locate
The BLW/BLL number
The hex displacement of the field
Data type and the number of bytes
2. Find the TGT Memory Map at the end of the compile listing. Record the offset within the TGT where the Base
Locators for Working Storage (BLW) or Base Locators for Linkage (BLL) can be found.
From the dump
29
1. Obtain the TGT address.
2. Add the offset from step 2 above to the TGT address. Go there in the dump. This will point to another address
which is the first base locator for working storage (BLW0) or the first base locator for linkage (BLL0).
3. If the field you wish to find is located off of BLW0/BLL0 then note this address. If it is located off of
BLW1/BLL1 then note the address in the next word, BLW2/BLL2 the third word... etc.
4. Add the displacement of the field, from the compile listing, to the base locator address found in the previous
step.
5. Go to the address obtained in the previous step. Starting at this address, highlight the number of bytes for the
field as defined in the program listing.
2009 IBM Corporation
The Program Listing
The Data Division map
Source
LineID
3
55
56
57
58
59
Hierarchy and
Data Name
Base
Locator
Hex-Displacement
Blk
Structure
Asmblr Data
Definition
Data Type
PROGRAM-ID BONUSCK-------------------------------------------------------------------------*
1 PAYPASS . . . . . . . . . . . .BLL=0003
000
DS 0CL12
Group
2 BONI-CHECK. . . . . . . . . .BLL=0003
000
0 000 000
DS 7C
Disp-Num
2 SALARY-CK . . . . . . . . . .BLL=0003
007
0 000 007
DS 5P
Packed-Dec
1 PAYCALC . . . . . . . . . . . .BLL=0004
000
DS 0CL5
Group
2 MONTHLY-SALARY. . . . . . . .BLL=0004
000
0 000 000
DS 5P
Packed-Dec
TGT Memory Map
TGTLOC.
000000
000048
00004C
000050
000051
000054
000058
00005C
000064
000068
000114
000118
00011C
30
RESERVED - 72 BYTES
TGT IDENTIFIER
RESERVED - 4 BYTES
TGT LEVEL INDICATOR
RESERVED - 3 SINGLE BYTE FIELDS
32 BIT SWITCH
POINTER TO RUNCOM
POINTER TO COBVEC
NUMBER OF FCB'S
WORKING-STORAGE LENGTH
WORKING-STORAGE ADDRESS
POINTER TO FIRST SECONDARY FCB CELL
POINTER TO STATIC CLASS INFO BLOCK
*** VARIABLE PORTION OF TGT ***
000120 BASE LOCATORS FOR SPECIAL REGISTERS
000128 BASE LOCATORS FOR WORKING STORAGE
00012C BASE LOCATORS FOR LINKAGE SECTION
000140 CLLE ADDR. CELLS FOR CALL LIT. SUB-PGMS.
000144 INTERNAL PROGRAM CONTROL BLOCKS
*** DSA MEMORY MAP ***
DSALOC
00005C
000000 REGISTER SAVE AREA
00004C STACK NAB (NEXT AVAILABLE BYTE)
000058 ADDRESS OF INLINE-CODE PRIMARY DSA
ADDRESS OF TGT
000080 PROCEDURE DIVISION RETURNING VALUE
2009 IBM Corporation
Transaction Dump Areas - Registers and Transaction Storage...
PSW & REGISTERS AT TIME OF INTERRUPT
PSW
REGS 0-7
REGS 8-15
078D0000
0C410590
0C410F18
8CB04E80
0C40F378
0C410450
00060004
0C411160
0CB04C50
EXEC INTERFACE BLOCK.
000000
0052848F 0099036F D7C1E8D9 0000035C
000020
000000D7 C1E8D9D6 D3D34000 00000000
00000000
0CB04E0C
0CB04D1C
0CB04B78
0CB04C3C
C4E8D7C7 00000660 00077D0A 02000000
000000C3 C1D3C340 40404000 00000000
PROGRAM COMMUNICATION AREA
000000
40F0F0F0 F0F1F0
ADDRESS 0C409C50 TO 0C409C56
TRANSACTION STORAGE-USER31
ADDRESS 0C40AB70 TO 0C411D5F
00000000
0C40F2E0
00000000
8CB04E5E
0C4111B0
00000000
*..d..r.?PAYR...*DYPG...-..'.....* 0C4000D0
*...PAYROLL ........CALC
.....* 0C4000F0
LENGTH 00000007
* 000010
* 0C409C50
LENGTH 000071F0
000000
E4F0F0F0 F0F0F3F5 00000000 00000000
00000000 8C00ABA8 00026B98 0BC4B418
*U0000035...............y..,q.D..* 0C40AB70
0059C0
0059E0
005A00
005A20
006080
0060A0
0060C0
0060E0
006100
00000000
0CB04B40
00000000
00000000
00000000
05000000
00000000
00000000
00000000
0C410594
00000000
0C4000D0
00000000
00000000
0C410D40
0C40CDB0
C9C7E9E2
00000000
*..........<........m......<.....*
*... ..<....m..<<................*
*.......-......... ... ..........*
*.... ..........................-*
*........................3TGT....*
*....-.........<.... ............*
*................. ..............*
*........SYSOUT IGZSRTCD........*
*................................*
31
00000000
0CB04C58
0C411160
40000000
00000000
60030220
0C410D78
00000001
00000000
0CB04C3C
0C410594
0C4111B0
00000000
00000000
0C410818
00000000
E2E8E2D6
00000000
00000001
0CB04C4C
00000000
00000000
00000000
000D4C2C
00000000
E4E34040
00000000
0C410408
0C4111B0
0C409C50
00000001
00000000
00000000
0000017C
D9E3C3C4
00000000
0CB04C9C
00000000
0C410F18
0C410450
F3E3C7E3
00000362
00000000
00000000
00000000
00000000
00000000
00000000
0C411160
00000000
00000000
00000000
00000000
00000000
0C410530
0C410550
0C410570
0C410590
0C410BF0
0C410C10
0C410C30
0C410C50
0C410C70
2009 IBM Corporation
Worksheet to Locate Storage Fields
From the compile listing for the program:
1. Go to the Data Division Map and note the following:
SALARY-CK uses BLL 3 plus a displacement of 7. It is a packed numeric data
type 5 characters long.
MONTHLY-SALARY uses BLL 4 plus a displacement of 0. It is a packed
numeric data type 5 characters long.
2. Find the TGT Memory Map at the end of the compile listing and record the
offset within the TGT where the Base Locators for Linkage (BLL) can be found.
The first base locator for linkage can be found at offset 12C from the
beginning of the TGT.
32
2009 IBM Corporation
Worksheet to Locate Storage Fields (continued)
From the dump:
1. Obtain the TGT address
The address of the TGT from R9 on page 1 of the dump is C410450.
2. Add the offset of the BLL cells to the TGT address obtained above, and go there.
This will point to another address, which is the first BLL.
Adding 12C to C410450 gives C41057C. Going to that storage location we find an
address of 00000000. This is BLL 0.
3.If the field you wish to find is located off of BLL 0 then note this address.
We want BLL 3 and BLL 4, so go over 4 words for BLL 3 and you see that the address is
C410F18. The next word is BLL 4, but it is 00000000. THIS IS THE CAUSE OF THE
0C4!
4. Add the displacement of the field, from the compile listing, to the base locator
found in the previous step.
Adding the displacement of SALARY-CK (7) to BLL 3 (C410F18), we get C410F1F.
5. Go to the address obtained in the previous step. Starting at this address, highlight
the number of bytes for the field - as defined in the program listing.
Looking at storage at address C410FF for 5 bytes, we find that the data is 005275000C.
This data looks fine.
33
2009 IBM Corporation
A final look at the program...
PAYCALC was not passed as an external reference when BONUSCK
was invoked, nor was storage acquired for it at runtime via a GETMAIN
or a READ SET command. As such, nothing mapped the 01 structure to
its actual storage, and BLL 4 remained 0.
000019
000055
000056
000057
000058
000059
000060
000061
000062
000063
000064
000065
000066
000067
000068
000069
000070
000071
000072
000073
000074
000075
000076
000077
34
LINKAGE SECTION.
01 PAYPASS.
10 BONI-CHECK
10 SALARY-CK
01 PAYCALC.
10 MONTHLY-SALARY
PIC 9(7).
PIC S9999999V99 USAGE COMP-3.
PIC S999999V99
USAGE COMP-3.
BLL=0003+000
BLL=0003+000
BLL=0003+007
BLL=0004+000
BLL=0004+000
*
PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA PAYPASS.
*
CALCULATE-BONUS.
*EXEC CICS WRITEQ TS QUEUE('CALC')
*
FROM(PAYPASS) MAIN
*END-EXEC.
Move length of PAYPASS to dfhb0020
Call 'DFHEI1' using by content x'0a02e0000700004900f0f0f0f2f5
'404040' by content 'CALC
' by reference PAYPASS by
reference dfhb0020 end-call.
*
* CALCULATE MONTHLY SALARY
*
DIVIDE SALARY-CK BY 12 GIVING MONTHLY-SALARY.
*
* IF BONUS AMOUNT IS LARGER THAN MONTHLY SALARY THEN ERROR
2009 IBM Corporation
A final look at the storage in the dump...
BLL cells 0, 1, 2, 3 and 4
0059C0
0059E0
005A00
005A20
006080
0060A0
0060C0
0060E0
006100
006120
006140
006160
006180
0061A0
0061C0
0061E0
006200
006220
006240
006260
0062C0
0062E0
00000000
0CB04B40
00000000
00000000
00000000
05000000
00000000
00000000
00000000
00000000
0C410D28
00000000
0C4000D0
00000000
00000000
C8C1D5C3
0C410D50
00000000
00000000
0F000000
00000000
F0F0F0F0
00000000
0CB04C58
0C411160
40000000
00000000
60030220
0C410D78
00000001
00000000
00000000
0C410AF0
0C410DD8
0C409C50
00000000
00000000
0C40BA18
000003D8
00000000
00000000
00000000
00000000
F1F00009
0CB04C3C
0C410594
0C4111B0
00000000
00000000
0C410818
00000000
E2E8E2D6
00000000
00000000
0CB02448
00000000
00000000
00000000
00000001
0C40BA18
000003C9
C9C7E9E2
E2E8E2D6
40404040
000000F0
C3C8D9C9
00000001
0CB04C4C
00000000
00000000
00000000
000D4C2C
00000000
E4E34040
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
D9E3C3C4
E4E34040
40404040
F0F0F0F1
E2E3C9D5
0C410594
00000000
0C4000D0
00000000
00000000
0C410D40
0C40CDB0
C9C7E9E2
00000000
00000000
8CB01E50
00000000
00000000
00000000
0C410BC0
8C410D50
00000000
00000000
00000000
00000000
F0C2D6D5
C5000000
0C410408
0C4111B0
0C409C50
00000001
00000000
00000000
0000017C
D9E3C3C4
00000000
00000000
0CB01FB0
0C410D88
00000000
00000000
0C410D88
0C4111E8
00000000
00000000
00000000
00000000
E4E2C3D2
C90004C8
0CB04C9C
00000000
0C410F18
0C410450
F3E3C7E3
00000362
00000000
00000000
00000000
0CB01F4C
0C410D28
0C410DD8
00000000
40000000
0C410DD8
00001000
00000000
00000000
0E000000
00000000
40000000
C1C1E200
00000000
00000000
00000000
0C411160
00000000
00000000
00000000
00000000
00000000
00000001
0CB01F84
00000000
00000000
00000000
00000000
00000B68
00000000
00000000
00000000
00000000
00000000
00000000
*..........<........m......<.....*
*... ..<....m..<<................*
*.......-......... ... ..........*
*.... ..........................-*
*........................3TGT....*
*....-.........<.... ............*
*................. ..............*
*........SYSOUT IGZSRTCD........*
*................................*
*...........................<....*
*.......0.......................d*
*.......Q...............h...Q....*
*. ... ..........................*
*........................ .......*
*.......................h...Q....*
*HANC. ... .............Y........*
*.......Q...I....................*
*........IGZSRTCD................*
*........SYSOUT ................*
*........
................*
*...........000010BONUSCK .......*
*000010..CHRISTINE...I..HAAS.....*
0C410530
0C410550
0C410570
0C410590
0C410BF0
0C410C10
0C410C30
0C410C50
0C410C70
0C410C90
0C410CB0
0C410CD0
0C410CF0
0C410D10
0C410D30
0C410D50
0C410D70
0C410D90
0C410DB0
0C410DD0
0C410E30
0C410E50
006300
006320
006340
0063A0
0063C0
00000000
12C6F0F8
00000000
00000000
40404040
0000C1F0
61F1F461
00000000
00000000
40404040
F0F1F2F1
F1F9F3F3
00000000
F0F0F0F0
40404040
F2F0F161
00527500
00000000
F0F0F500
40404040
F0F161F1
0C000100
00000000
5275000C
40404040
F9F6F5D7
000C0004
00000000
00000000
40404040
D9C5E240
22000C00
00000000
40404040
404040D7
40404000
00000000
00000000
40404040
C8D6D5C5
*......A00121201/01/1965PRES
.*
*.F08/14/1933....................*
*................................*
*........0000005.........
*
*
PHONE*
0C410E70
0C410E90
0C410EB0
0C410F10
0C410F30
35
2009 IBM Corporation
Program Linkage information
PAYMENU
PROGRAM INFORMATION FOR THE CURRENT TRANSACTION
Number of Levels 00000002
INFORMATION FOR PROGRAM AT LEVEL 00000002 of 00000002
Program Name
PAYPGM1
Invoking Program PAYMENU
Load Point
0CB01E30
Program Length
00002CE8
Entry Point
8CB01E50
Addressing Mode AMODE 31
Language Defined Unknown
Language Deduced Unknown
Commarea Address 0C409C50
Commarea Length 00000007
Execution Key
USER
Data Location
ANY
Environment
User application
INFORMATION FOR PROGRAM AT LEVEL 00000001 of 00000002
Program Name
PAYMENU
Invoking Program CICS
Load Point
0CB00000
Program Length
00001E28
Entry Point
8CB00020
Addressing Mode AMODE 31
Language Defined Unknown
Language Deduced Unknown
Commarea Address 0C403988
Commarea Length 00000007
Execution Key
USER
Data Location
ANY
Environment
User application
36
PAYPGM1
PESA
System
TCA
C Prev PESA
or zeroes
18 RSAPCHS
38 TCAPCSA
40 TCAPCHS
2009 IBM Corporation
Cookbook to Locate Information in a CICS Link
1. Locate field TCAPCSA. If it is equal to zeroes, stop. This means that no link is
currently active.
2. Add x'18' to the address found in TCAPCSA.
3. Go to that location in storage. It will be within a heading of KERNEL STACK
ENTRY OWNED BY DFHPGLE with an eyecatcher of DFHPESA.
4. At that location should be another address. This address can be used just like
TCAPCHS to locate the linker's working storage and registers. For COBOL II
programs, this IS the TGT address.
5. If this is a COBOL for MVS program or higher, add x'5C' to the address found
in the previous step and go there in the dump. At that storage location will
be another address that is the TGT address.
6. Follow the Cookbook to Locate Storage Fields at this point to find any fields
you wish.
7. If there are more than two links involved, there will be multiple PESA's. To see
if there are additional links, take the address in step 1 above and add x'C' to it. If
this is zeroes, there are no more links.
8. If it is not zero, add x'18' to the address that was found at offset x'C' to find the
third program's working storage and registers, and so forth.
37
2009 IBM Corporation
Locating Storage involved in a Link
TASK CONTROL AREA (SYSTEM
000000 00000000 00000000
000020 00000000 00000000
000040 0C40F2E0 00000000
AREA) --- TCAPCSA is at offset X'38'
00000000 00000000 0000035C 0BDC9EE4 00000042 00000000
00000000 00000000 00000000 00000000 0C33E720 00000000
00000000 00000000 00000000 00000000 00000000 00000000
KERN STACK ENTRY OWNED BY DFHPGLE
000000 00000490 0C33E0C0 00000000 8BF7FE5C
...
0003A0
0003C0
0003E0
000400
000420
000440
000460
000480
00EC6EC4
00000000
DEE40000
00000000
00000000
00008C00
4F0F0C00
00000000
C6C8D7C5
00070000
00000000
00000000
00000000
684E0002
5F0E0C00
00000000
E2C10180
00000000
08000100
00000000
00000C40
6B980BC4
6F0D0C00
05330180
TRANSACTION STORAGE-USER31
000000
....
004300
004320
004340
38
00000000
00000C40
00068880
00000000
00D00C40
B4180C33
7F0C0004
0C33EA60
*...................*...U........*
*..........................X.....*
*. 2.............................*
0BE77780
0BE777A0
0BE777C0
8BB00280 00000410 0C33E4A0 00006000
*.............7.*..........U...-.*
0C33E380
8C2412F4
39A80000
80000000
00000000
39880C40
DE900BE7
73C80000
*..>DFHPESA..........4...........*
*............... .y..............*
*.U............h............ .0..*
*................................*
*........... ... .h. ............*
*.....+..,q.D.......X.h..........*
*........?........H.........X....*
*...............*
0C33E720
0C33E740
0C33E760
0C33E780
0C33E7A0
0C33E7C0
0C33E7E0
0C33E800
00000000
00000000
00000000
00000000
7C680000
79888C00
00150C34
0C407C68
00000C34
00000C40
00000000
00000000
3F100C33
78280BE7
ADDRESS 0C4039A0 TO 0C40AB6F
00000000
78280C33
39F00000
00000000
00000000
DB900C00
76800000
LENGTH 000071D0
E4F0F0F0 F0F0F3F5 8C009E08 0C33E0C0
0C00AE07 00000024 8C347844 0C33E3E4
*U0000035......................TU*
0C4039A0
0C4099F0 0CB0012C 0CB002A4 0C405BE0
0C407C68 0C4099F0 00000000 00000000
00000000 00000000 00000000 00000000
00000000 0C407D60 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 0CB007E4
*. r0.......u. ...... '-........*
*. ... r0........................*
*...............................U*
0C407CA0
0C407CC0
0C407CE0
2009 IBM Corporation
Worksheet to Locate Information in a Link
1. Locate field TCAPCSA within the dump.
The TCAPCSA address is C33E720. Since this is not zeroes, we know that a link is
currently active.
2. To locate storage fields for the LINKED FROM program, add x'18' to the address in
TCAPCSA.
Adding x'18' to C33E720 gives us C33E738. Going there in the dump, we find an
address of C407C68 (as this is COBOL for MVS, add 5C to this address to then take us
to address C407CC4. This contains the TGT address - C4099F0).
This is akin to having TCAPCHS for the LINKED FROM program. To find storage areas
for the LINKED FROM program, use the 'Cookbook to Locate the TGT' and the
'Cookbook to Locate Storage Fields' substituting the address we just obtained,
C407CC4, for Register 13, the EIP entry or TCAPCHS address (approaches 2 through
4).
3. To see whether a third link is involved, take the address in TCAPCSA and add
x'C' to it. At that storage location, if it is zeroes, no further links are involved.
TCAPCSA address of C33E720 plus x'C' gives us C33E72C. This location contains
zeroes.
39
2009 IBM Corporation
COBOL... COBOL, COBOL,
Depending on what level of COBOL your program is compiled against, various
differences will be seen.
CICS has supported various flavours of COBOL
OS/VS COBOL
VS COBOL II
IBM COBOL for OS/390 and VM
IBM Enterprise COBOL for z/OS and OS/390
One noticeable difference is the TGT eyecatcher.
This will be TGT, 2TGT or 3TGT...
NOTE 3TGT is the eyecatcher for Enterprise COBOL
00000000 40000000 00000000 00000000 00000000 00000001 0C410450 0C411160 *.... ..........................-* 0C410590
00000000 00000000 00000000 00000000 00000000 00000000 F3E3C7E3 00000000 *........................3TGT....* 0C410BF0
05000000 60030220 0C410818 000D4C2C 0C410D40 00000000 00000362 00000000 *....-.........<.... ............* 0C410C10
40
2009 IBM Corporation
Additional Reference
http://ew.share.org/client_files/callpapers/attach/SHARE_in_Orlando/S1055RE123730.pdf - checklist for CICS-COBOL debugging
41
2009 IBM Corporation
FAULT ANALYZER
42
2009 IBM Corporation
Fault Analyzer
IBM product to assist with problem determination
5655-U28
Provides abend analysis assistance
COBOL
PL/I
Assembler
C/C++
Language Environment
UNIX System Services
CICS
IMS
DB2
MQSeries
WebSphere
Java
43
2009 IBM Corporation
Fault Analyzer and CICS
Problem determination and dump analysis assistance for Faults
Fault Analyzer provides diagnostic analysis for CICS
Transaction abends
System dumps
For transaction abends and dumps, Fault Analyzer is invoked to capture information
at the time
Via CICS XPCABND GLUE for transaction abends
Via CICS XDUREQ GLUE for EXEC CICS DUMP TRANSACTION commands
Via LE abnormal termination exit CEECXTAN
The information and report can be saved in a history file for later analysis
For system dumps, Fault Analyzer runs against the SDUMP itself
Fault Analyzer does not need to be installed in the CICS region to do this
The dump taken as normal, and analysed / dynamically navigated after the event
44
2009 IBM Corporation
How Fault Analyser is used with CICS
CICS
Fault Analyzer
Task
EXEC CICS DUMP
ABEND
System
Abend
45
System and
transaction
dump Fault
reports and
CREATE TRANDUMP FAULT
data
XDUREQ GLUE
XPCABND GLUE
System
dump
data sets
TSO
CICS DUMP DOMAIN
INVOKE FAULT ANALYZER
2009 IBM Corporation
Fault Analyzer setup work
Add the Fault Analyzer library to the CICS DFHRPL concatenation
DD DSN=PP.FAULTANL.V810.SIDIAUTH,DISP=SHR
Add an entry into PLT for PI and SD:
DFHPLT TYPE=ENTRY,PROGRAM=IDIPLT
This allows CICS to invoke Fault Analyzer via its GLUEs at dump or abend
time, to capture transaction dump information for a Fault report
Define the Fault Analyzer programs and map to CICS, or utilise program
autoinstall to define them
IDIPLT, IDIPLTD, IDIPLTS, IDIXCX52, IDIXCX53, IDIXFA, IDIXMAP
Configure CICS LE abnormal termination CEECXTAN CSECT exit
IDIXCCEE
This exit invokes Fault Analyzer for LE programs
46
2009 IBM Corporation
Invoking Fault Analyzer
You can invoke if from under
TSO...
or explicitly invoke it against a
system dump data set (or
a history file
in ISPF 3.4)
47
2009 IBM Corporation
Fault Entry List
Fault History File
Holds dump data
For System dumps
For Transaction
dumps too
In reverse order
Jobname
For SDUMPs
Transid
48
Newest to oldest
For tran dumps
2009 IBM Corporation
The Query option - ?
Query gives you a view of a
Faults info
Each Fault has specific
attributes:
Transaction dumps have info
on transid, tasknum, etc
Query provides an overview of
a Fault
49
abcode,
Jobname,etc.
Helps locate the
one of interest
2009 IBM Corporation
Analyzing a transaction dump Fault
The dump can be
interactively analysed
(using I)
The original report can
be reviewed (using V or
S)
50
This was produced
at the time of the
transaction abend or
DUMP
TRANSACTION
command
2009 IBM Corporation
The Interactive Reanalysis Report - I
Fault Summary describes
the failing environment
The options list allows you
to review further
information about the
cause of the dump
Lets select the dump
Synopsis (1) and then the
Event Summary (2) ...
51
2009 IBM Corporation
Synopsis and Event Summary options (1 and 2)
Synopsis
(outlines the
type of abend,
and where it
occurred)
Event Summary
(gives the
program call
stack that led
to the abend)
Yellow is
hypertext!
52
2009 IBM Corporation
Clicking on P+92, from Event Summary stack...
53
This link takes you to the memory location associate with the program + offset x92
This shows the offending piece of code (0000 in this example)
Fault Analyzer is built around this dynamic content navigation ...
2009 IBM Corporation
The CICS Information option (3)
54
You can review the tasks CICS
environment at the time of the transaction
dump
The CICS Control Blocks shows the EIB,
TWA, CSA, OFL, CWA, TCA, TACB, EIS,
EIUS and TCTTE
Transaction Storage shows all USER24,
USER31, etc, storage
Lets review the Summarized CICS Trace (5)
and CICS Trace Formatting (6) ...
2009 IBM Corporation
Summarized CICS Trace (5) ...
EXEC CICS commands are hyperlinked where they were issued
55
Identifies calling program and offset within it
The Summarized CICS Trace defaults to the most interesting entries
Standard Abbreviated trace formatting by default ...
2009 IBM Corporation
CICS Trace Formatting (6) ...
Formatting
options can be
changed
Short or Full
trace may be
used instead
The Highlight
Interval time
period can be
changed
Can show more
than
summarized
entries
56
2009 IBM Corporation
CICS Levels, Commareas, Channels (8)
The CICS Link Level summary shows
the nested hierarchy of the
programs within the transaction
being analysed
PROGA1 (the program which had
the abend) is at Link Level 3
Note that IDIXCX53 is seen
because it was part of the Fault
Analyzer run-time code which
captured the transaction dump itself!
Clicking on an Event number takes
you to a summary for that event
(lets try number 12 ...)
57
Events were also accessible from
the Event Summary (2) ...
2009 IBM Corporation
CICS Event Details example
The abend
Event, 12
Not shown:
instructions
near point of
failure, PSW,
GPRs, EIB ...
Older Event
data relates to
the linking
programs
No listing was
available here
58
2009 IBM Corporation
Relating an Event to the line of source
An example of when
a program listing was
available......
59
The assembly JCL
had ADATA on its
ASM PARM, and a
step to IDILANGX
to copy the ADATA
metadata into a
data set for Fault
Analyzer to refer to
(Click on the List Stmt
# to see failing
instructions in
context...
2009 IBM Corporation
Seeing a failing source line in context
Line 346 is the
cause of the
program check
S0C1
This is a very
contrived
example, to
demonstrate
how you can
easily review
your program
source as part
of dump
analysis ...
60
2009 IBM Corporation
Remaining Interactive Reanalysis Report options
4 - Storage Areas
5 - Language Environment Heap Analysis
Breaks down the Heap storage used by the LE enclave
Bytes allocated, bytes free, number of storage elements
6 User
Shows the CICS concatenated data sets with source DSECTs
7 Abend Job Information
Shows the CICS job environment, DFHRPL and STEPLIB members,
transaction program details and linkedit mapping, execution environment and
LE runtime options
8 Fault Analyzer Options
61
Shows Hex-dumped storage for the Events
Options in effect, data sets used by Fault Analyzer, exit programs invoked....
2009 IBM Corporation
Abend Job Information (7) Job Overview
62
This provides a
useful overview of
the failing
environment ...
The job ID, Name,
Step Name, ASID
number, etc ...
DFHRPL and
STEPLIB are given
(not shown here)
2009 IBM Corporation
Abend Job Info (7) Event-Related Programs
The transactions
programs are listed,
with their compilation
and linkedit dates and
times
The failing programs
linkedit map is
expanded
63
The CSECT
AMODEs and
RMODEs are
displayed
2009 IBM Corporation
Abend Job Info (7) Environment / LE options
The z/OS level, JES type
and CPU Model are
returned
64
Levels of SMS and
LE are returned too
The Language
Environment run-time
options are formatted
out
Not all shown here for
clarity
This gives a helpful
overview of Language
Environment settings
2009 IBM Corporation
A SHOW storage example
Enter SHOW
command
followed by an
address
e.g. SHOW
1511C3E0
The storage is
displayed
PF7 and PF8 to
navigate
backwards and
forwards
Relative offsets
given
65
2009 IBM Corporation
A DSECT mapping example
66
Select a control block address (e.g. DFHEIUS); press PF4
Enter the DSECT name, and the storage is mapped for you ...
2009 IBM Corporation
Analyzing a system dump Fault
As with transaction
dumps, the system dump
Fault can be interactively
analyzed (using I)
Remember the Fault can
be created by running
Fault Analyzer against the
original SDUMP data set
This example is the
system dump that was
generated by CICS at the
time of the S0C1 which
produced the ASRA
transaction dump ...
67
2009 IBM Corporation
CICS Transaction Dumps
Controlling transaction dumps
via the CICS Transaction Dump Table
Printing CICS transaction dumps
via the supplied dump utilities
68
2009 IBM Corporation
The Transaction Dump Table
This is a dynamically created table used in CICS to control transaction dumps.
CEMT INQ TRDUMPCODE
STATUS: RESULTS - OVERTYPE TO MODIFY
Trd(AEIN) Tra
Loc Max( 999 ) Cur(0003)
Trd(AEYD) Tra
Loc Max( 005 ) Cur(0001)
Trd(ARCH)
Sys
Loc Max( 002 ) Cur(0002)
Trd(ASRA) Tra
Loc Max( 010 ) Cur(0003)
Trd(ATNI) Tra
Loc Max( 000 ) Cur(0047)
Trd(GONE)
Shu Loc Max( 001 ) Cur(0000)
Trd(MAGA) Tra Sys
Loc Max( 999 ) Cur(0005)
Trd(SVIO) Tra Sys Shu Rel Max( 999 ) Cur(0000)
Dump related messages go to the CDUL log.
TRDUMAX (SIT option) controls the initial setting for the MAX parameter
69
2009 IBM Corporation
Printing CICS Transaction Dumps
Refer to the CICS Operations and Utilities Guide for additional information.
The CICS supplied Dump Utility Program
DFHDU660 - CICS TS 4.1
DFHDU650 - CICS TS 3.2
DFHDU640 - CICS TS 3.1
DFHDU630 - CICS TS 2.3
The utility suffix represents the release number of CICS
Note that CICS TS 3.1 used R640!
70
2009 IBM Corporation
Printing CICS Transaction Dumps (continued)
To list the available dumps in the transaction dump data set:
SELECT TYPE=SCAN
Selecting dumps to be formatted by the utility:
SELECT TYPE={OR | NOTOR | AND | NOTAND | SCAN}
TRANID=({value|generic-value,...})
DUMPCODE=({value|generic-value,...})
DUMPID=({value|value-range,...})
PAGESIZE=({value|60})
TIME=({time|time-range,...})
UPPERCASE=(YES|NO})
END
Example:
SELECT TYPE=OR,DUMPID=(1/0005)
SELECT
TYPE=NOTOR,TRANID=(CE+T,CS*),DUMPCODE=(ATN*,AZI6)
71
2009 IBM Corporation
References and further reading ...
CICS TS 3.2 InfoCenter
http://publib.boulder.ibm.com/infocenter/cicsts/v3r2
Rational Developer for System z
http://www-306.ibm.com/software/awdtools/rdz/
Debug Tool for System z
http://www-306.ibm.com/software/awdtools/debugtool/
Problem determination tools
http://www-306.ibm.com/software/awdtools/deployment
Fault Analyzer
http://publibfp.boulder.ibm.com/cgibin/bookmgr/BOOKS/idiugi00/CCONTENTS
CICSPlex System Manager WUI
http://publib.boulder.ibm.com/infocenter/cicsts/v3r2/topic/com.ibm.
cics.ts.cpsmwui.doc/topics/eyuad_overview.html
CICS Explorer
http://www-306.ibm.com/software/htp/cics/explorer/
72
2009 IBM Corporation
Summary
CICS debugging made easier...!
Follow the cookbooks
Be sure you are aware of what level of COBOL the program was
compiled with:
2TGT versus 3TGT
Correct utilities
Correct manuals
Observe EYEBALL information in dumps
Use log messages (CEEMSG, JESMSGLG, MSGUSR, etc).
Fault Analyzer is extremely powerful and very useful
Take advantage of the dump tables and the dump utilities
Good luck
73
2009 IBM Corporation