Analyzing data exceptions
This topic describes how to use the CCAADEMO demonstration program shipped on the Abend-AID for CICS product tape to create an S0C7 data exception and how to use Abend-AID for CICS to solve the transaction abend.
Analyzing a sample S0C7 data exception
The sample S0C7 data exception shown in this chapter was produced from the COBOL demonstration program CCAADEMO provided on the Abend-AID for CICS product tape in the installation sample library (.CTL). You can create this abend yourself, executing the AADM transaction to produce an ASRA abend, provided the appropriate CICS table entries are defined as described in the Abend-AID Installation and Configuration Guide.
The program in this chapter includes source support. We recommend that you always use source support to make the best use of Abend-AID for CICS. To include source support, compile CCAADEMO with compile/link-edit JCL modified to use the COBOL language processor. Refer to the BMC AMI Common Shared Servicesguide for information about the COBOL language processor.
Further, you can also use the supplied PL/I demonstration program CCAADEMP or the Assembler demonstration program CCAADEMA, located in the installation sample library ( hlq .CTL) and follow a similar procedure. If the appropriate CICS table entries have been made, you can execute the PL/I AADP or Assembler AADA transaction to produce an abend. To include source support, compile CCAADEMP (PL/I) or CCAADEMA (Assembler) with compile/link-edit JCL modified to use the PL/I language processor or Assembler language processor, respectively. Refer to the BMC AMI Common Shared Services guide for information about the PL/I and Assembler language processors.
As an alternative to using CCAADEMO/CCAADEMP/CCAADEMA, you can create your own transaction report and follow along using the procedure described below.
The following steps describe a possible approach to solving a data exception. Abend-AID for CICS provides a great deal of information related to the abend that may be of interest to you in your analysis, and not all relevant screens are discussed in this approach.
Select the Diagnostic Summary for this S0C7 data exception. Note the following information about this abend:
- Program name.
- Abending statement, its statement number, and paragraph name.
- Field in error, its picture length and type, and the field’s value.
- Next Sequential Instruction.
- Program’s compile date and time.
- Last EXEC CICS command and its statement number.
- PSW and SCREEN fields.
Diagnostic Summary, Page 1
Abend-AID -------------- Diagnostic Summary ------------- Row 000001 of 000073
COMMAND ===> SCROLL ===> PAGE
An ASRA abend occurred in program CCAADEMO. The abending transaction was
AADM running at terminal A494 for user ID CICSUSR.
Analysis of error
The Data Exception is caused when a decimal instruction is attempted on a
field that does not contain valid packed data, eg. contains an invalid digit
(not 0-9), or its last byte contains an invalid sign (Not F, C, OR D).
The data exception occurred in the following statement:
000400 COMPUTE CURR-PAY EQUAL WA-HOURS * WA-RATE
This statement is contained in paragraph "300-EMPLOYEE-PAY-RTN" in program
CCAADEMO.
COBOL InformationDiagnostic Summary, Page 2
Abend-AID ----------------- Diagnostic Summary --------- Row 000020 of 000073
COMMAND ===> SCROLL ===> PAGE
COBOL Information
Current values of fields on this statement:
Level/Field Name Picture/Type Value
77 CURR-PAY 9(5)V99 0000000
02 WA-HOURS # 999 ***
02 WA-RATE 9(3)V99 00950
’#’ - Indicates field contains invalid data that does not match
field description in the program. Note that even valid data
could cause an error (for example, a zero divide).
Next Sequential Instruction
The next statement is:
000401 COMPUTE CURR-TAXES EQUAL CURR-PAY * WA-TAX-RATE
This statement is contained in paragraph "300-EMPLOYEE-PAY-RTN" in programDiagnostic Summary, Page 3
Abend-AID ----------------- Diagnostic Summary --------- Row 000038 of 000073
COMMAND ===> SCROLL ===> PAGE
Next Sequential Instruction
The program was compiled on 29JUN2004 at 10:51:14 and is 0017B0 bytes long.
It is part of load module CCAADEMO which was loaded from CW.CC.DEMO.PGMLOAD.
It was link edited on 29JUL2019 and is 001C20 bytes long.
The program AMODE is 31 and program RMODE is 24.
The execution key for this program was USER_KEY.
Last Call or EXEC CICS Request
The last call or ’EXEC CICS’ command was:
000369 *EXEC CICS RECEIVEDiagnostic Summary, Page 4
Abend-AID ----------------- Diagnostic Summary --------- Row 000057 of 000073
COMMAND ===> SCROLL ===> PAGE
Last Call or EXEC CICS Request
This statement is contained in paragraph "200-RECEIVE-INPUT" of program
CCAADEMO.
Program Link Summary
Called Called ------- Status ------- Calling CallingReturn
Load Mod Program Load Mod Program Offset
CCAADEMO CCAADEMO Linked By System 000000
Supporting Information:
DATASTRM - Data Stream Analysis
EIB - User Execute Interface BlockDiagnostic Summary, Page 5
Abend-AID ----------------- Diagnostic Summary --------- Row 000070 of 000073
COMMAND ===> SCROLL ===> PAGE
Supporting Information:
SCREEN - Last 3270 Screen
PSW - Program Status Word
REGS - RegistersUse the cursor point-and-shoot feature and press Enter at the value for the field in error, WA-HOURS. Abend-AID for CICS displays the Expanded Data Field screen. This screen displays the selected data in vertical-hexadecimal format.
Expanded Data Field screen
Abend-AID --------------- Expanded Data Field ----------- Row 000001 of 000004
COMMAND ===> SCROLL ===> PAGE
Field Name... WA-HOURS
Storage Type. Working Storage
0875A3E4Char***
Zone555
Digit CCC
1..Press the END PF key to return to the Diagnostic Summary. Use the cursor point-and-shoot feature and press Enter at the PSW field. Abend-AID for CICS displays the PSW Information screen. This screen displays the actual abending assembler instruction issued for the COBOL compute statement and identifies it as a multiply decimal instruction. The first operand of the instruction is the packed decimal format of WA-HOURS, which is 000000CCCF in hexadecimal storage.
PSW Information screen
Abend-AID --------------- PSW Information --------------- Row 000001 of 000018
COMMAND ===> SCROLL ===> PAGE
To display Registers at abend, select REGS
Program Status Word at Time of Abend Program Information
PSW................. 078D1000 801695A0
Instruction Length.. 0006 Program..CCAADEMO
Interrupt Code...... 0007 Offset...000D72
Description......... Multiply Decimal
AddressInstructionOpcode D1(L1,B1),D2(L2,B2)
0016959A FC42 D1B0 D1B8 MP 432(5,13),440(3,13)
The first operand was located at address 08A481E0 and contained -
000000CC CF * .. *
The second operand was located at address 08A481E8 and contained -
00950F* n. *- If you compile your program with the PMAP compiler option for OS/VS COBOL or the LIST compiler option for VS COBOL II, a section of the output in the source listing displays the equivalent assembler instructions of a COBOL program. To view the statement in error from the PMAP/LIST of the source listing, access the entire program listing via the Source Directory. You can access the Source Directory in several alternate ways:
- Enter the fast-path command SRCDIR.
- Enter the =R jump command.
- Select it directly from the Report Menu.
- Return to the Diagnostic Summary and follow the sequence described below.
Press the END PF key to return to the Diagnostic Summary screen. Use the cursor point-and-shoot feature and press Enter at the program name field, CCAADEMO. Abend-AID for CICS displays the Program Detail screen.
Program Detail screen
Abend-AID ---------------------- Program Detail -----------------------------
COMMAND ===>
Program CCAADEMO is part of load module CCAADEMO which was loaded from
CW.CC.DEMO.PGMLOAD
Source was loaded from dataset CWV.CC.DEMO.LISTFILE
To display the source listing for this program, select Listing
To display Cobol storage areas for this program, select Storage Areas
Program Information Program-Related Areas
Compile Date............. 29JUL2019PPT Entry................ 08302928
Compile Time............. 10:51:14 Commarea................. 08330018
Link Date................ 29JUL2019 Entry Point Address...... 00168828
Source Compile Date...... 29JUL2019 Savearea................. 08A48030
Source Compile Time...... 10:51:14 BREXIT................... N
Program Size............. 000017B0
Program Rmode............ 24
Program Amode............ 31
Language Information
CICS Type................ COMMANDEXECkey.................. USER
Language................. COBOL ZOSData above 16meg?........ N
LE/370 Enabled?.......... NUse the cursor point-and-shoot feature and press Enter at the source data set name field on the Program Detail screen. Abend-AID for CICS displays the Source Program Directory.
Source Program Directory
Abend-AID -------------- Source Program Directory -------------- Row 0000001
COMMAND ===> SCROLL ===> CSR
Dataset Name..... BMC.CC.DEMO.LISTING
S Select L Lock I Information
U Unlock D Delete X Export
Compile Compile Return Locked Completion
Program Date Time Code Language Size Status Status
******** ********* ******** ****** ********** ****** ******** **********
CELPROG1 26SEP2019 10:55:35 4 COB/Z V5R2 54K LOCKED-M COMPLETE
s CCAADEMO 23SEP2019 10:51:14 0 COB/Z V5R2 191K LOCKED-M COMPLETE
_ CCAADEMO 20SEP2019 13:59:14 8 COB/Z V6R4 159K LOCKED-A COMPLETE
_ CCASQLD 09FEB2019 14:45:29 4 PL1EN V5R2 223K LOCKED-M COMPLETE
_ CCASQLD 09OCT2018 14:33:43 4 COB/Z V6R4 223K LOCKED-A COMPLETE
_ CCADLI 18NOV2018 13:18:58 4 COB/Z V6R4 105K LOCKED-M COMPLETE
_ CCADLG 30NOV2018 16:46:17 0 COB/Z V6R4 63K LOCKED-M COMPLETE
_ CCASRA 19APR2018 09:17:13 0 COB/Z V6R4 95K LOCKED-A COMPLETE
_ CCAEIM 19APR2018 08:29:24 0 COB/Z V6R4 63K LOCKED-M COMPLETE
_ CCAEIP 17APR2018 01:50:36 0 COB/Z V6R4 63K LOCKED-M COMPLETE
Type a line command and press Enter to process it.Enter the S line command at the Program field of the source listing for the abending program. Be sure to select the source listing whose name and date most closely match the program name and compile date shown in the Diagnostic Summary. Abend-AID for CICS displays the Source Program Browse screen.
Source Program Browse screen
Abend-AID ------------ Source Program Browse ------------ Row 000001 of 002893
COMMAND ===> SCROLL ===> DATA
==>
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROCE
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROCE
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROCE
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROCE
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROCE
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROCE
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PROC*
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PRO*
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL PR*
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL P*
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL * *
COMPUWARE COBOL PROCESSOR*COMPUWARE COBOL******
RELEASE 17.02.00 (05/16/
COPYRIGHT (C) 1984, 2019, COMPUWARE CORPOR
RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OEnter the FIND ’000400 COMPUTE’ primary command to locate the statement in error from the PMAP/LIST of the source listing. Enter two spaces between ’000400’ and ’COMPUTE’ to find this exact text string. Note the assembler instructions for the COBOL compute statement—in particular, the multiply packed (MP) instruction, which was identified as the statement in error on the PSW screen.
Source Program Browse screen — COMPUTE Statement in Error
Abend-AID ------------ Source Program Browse ----------- Row 001838 of 002295
COMMAND ===> SCROLL ===> PAGE
==>
000399 IF
000D46 95D5 A160 CLI 352(10),X’D5’ WA-TYPE
000D4A 4780 B66A BC 8,1642(0,11) GN=11(000D5E)
000D4E 95C9 A160 CLI 352(10),X’C9’ WA-TYPE
000D52 4780 B66A BC 8,1642(0,11) GN=11(000D5E)
000D56 95E2 A160 CLI 352(10),X’E2’ WA-TYPE
000D5A 4770 B6FC BC 7,1788(0,11) GN=10(000DF0)
000D5E GN=11 EQU *
000400 COMPUTE
000D5E F242 D1B0 A1AC PACK 432(5,13),428(3,10) TS2=0
000D64 960F D1B4 OI 436(13),X’0F’ TS2=4
000D68 F224 D1B8 A18B PACK 440(3,13),395(5,10) TS2=8
000D6E 960F D1BA OI 442(13),X’0F’ TS2=10
000D72 FC42 D1B0 D1B8 MP 432(5,13),440(3,13) TS2=0
000D78 F363 A038 D1B1 UNPK 56(7,10),433(4,13) CURR-PAY
000D7E 96F0 A03E OI 62(10),X’F0’ CURR-PAY+6
000401 COMPUTE
000D82 F266 D1B0 A038 PACK 432(7,13),56(7,10) TS2=0
000D88 960F D1B6 OI 438(13),X’0F’ TS2=6
000D8C F223 D1B8 A19A PACK 440(3,13),410(4,10) TS2=8
000D92 960F D1BA OI 442(13),X’0F’ TS2=10Next, to determine how the invalid data was placed in the WA-HOURS field, go to the Last 3270 Screen Image. Looking at the last screen image before the abend can help in determining the program flow to the abend. Repeatedly press the END PF key until you return to the Diagnostic Summary. Use the cursor point-and-shoot feature and press Enter at the SCREEN field. Abend-AID for CICS displays the Last 3270 Screen Image. Note that 00001 was entered as the employee number when the abend occurred.
Last 3270 Screen Image
ADM 00001 - ENTER EMPLOYEE NUMBER
*** COMPUWARE CORPORATION ***
DEMONSTRATION TRANSACTION
ENTER DESIRED EMPLOYEE ABOVE:
00001 - CAUSES ASRA ABEND
00002 - CAUSES AEIM
00003 - CAUSES AEIP
00004 - CAUSES DB2 IVP
00999 - ENDS NORMALLYPress the END PF key to return to the Diagnostic Summary screen. Use the UP PF key to scroll to the field that contains invalid data, 02 WA-HOURS. Use the cursor point-and-shoot feature and press Enter at this field to display working storage for this program. The Program Listing screen displays the Working-Storage Section, Linkage Section, and Procedure Division for the abending program. You can scroll throughout the sections using the PF keys. Further, you can search for specific data or text strings using the FIND primary command.
Program Listing Screen — Working Storage — Field in Error
Abend-AID -------------------- Program Listing ---------- Row 000078 of 000307
COMMAND ===> SCROLL ===> PAGE
==>
Program............... CCAADEMO
Program Compile Date.. 12JUL2019Source Listing Date... 12JUL2019
Program Compile Time.. 15:58:26 Source Listing Time... 15:58:26
To reset display to the abending/last executed statement, select RESET
To reset display to the point of entry into this listing, select ENTRY
Source Line
*******************************************************************************
02 WA-HOURS # 999 ***
02 WA-MSG X(26) SPACES
01 VSAM-EMP-RECORD
02 EMP-NUM-KEY X(5) LOW-VALUES
02 EMP-NAME X(15) LOW-VALUES
02 EMP-HOURS # 999 LOW-VALUES
02 EMP-TOTPAY # 9(5)V99 LOW-VALUES
02 FILLER X(50) X’00000E040404400000
01 EMP-RECORD-TABLE
02 EMP-RECORD-TBL
03 EMP-NUM-KEY-TBL (1 ) X(5) SPACES
03 EMP-NAME-TBL (1 ) X(15) 1107302C03C0Use the UP PF key to scroll to the 01 level or group name, WORK-AREA, for the field in error. Note that WA-HOURS is the second to last field under group name WORK-AREA.
Program Listing Screen — Working Storage — Group Name for Field in Error
Abend-AID ------------------- Program Listing ----------- Row 000055 of 000307
COMMAND ===> SCROLL ===> PAGE
==>
Program............... CCAADEMO
Program Compile Date.. 12JUL2019 Source Listing Date... 12JUL2019
Program Compile Time.. 15:58:26 Source Listing Time... 15:58:26
To reset display to the abending/last executed statement, select RESET
To reset display to the point of entry into this listing, select ENTRY
Source Line
*******************************************************************************
01 WORK-AREA
02 WA-TYPE X N
02 WA-NAME X(15) MR. DAVID ABEND
02 WA-ADDRESS
03 WA-STREET X(12) 456 MAIN ST.
03 WA-CITY X(8) HOMETOWN
03 WA-STATE XX MI
03 WA-ZIP X(5) 48010
02 WA-RATE 9(3)V99 00950
02 WA-DATE-EFF
03 WA-DTEFF-MM XX 01
03 WA-DTEFF-DD XX 01Next, press Enter at the RESET field to display the Procedure Division of the program with the cursor positioned at the abending statement, as shown in the following figure:
Program Listing — Abending Statement
Abend-AID ------------------- Program Listing ----------- Row 000070 of 000287
COMMAND ===> SCROLL ===> PAGE
==>
Program............... CCAADEMO
Program Compile Date.. 12JUL2019 Source Listing Date... 12JUL2019
Program Compile Time.. 15:58:26 Source Listing Time... 15:58:26
To reset display to the abending/last executed statement, select RESET
To reset display to the point of entry into this listing, select ENTRY
Source Line
*******************************************************************************
000400 COMPUTE CURR-PAY EQUAL WA-HOURS * WA-RATE
000401 COMPUTE CURR-TAXES EQUAL CURR-PAY * WA-TAX-RAT
000402 ADD CURR-PAY TO WA-YTD-GRS
000403 ADD CURR-TAXES TO WA-YTD-TAX.
000404
000405 IF PAYEMP1 EQUAL ’00001’
000406 MOVE WORK-AREA TO PAYROLL-DATA-EMP001.
000407
000408 IF PAYEMP1 EQUAL ’00999’
000409 MOVE WORK-AREA TO PAYROLL-DATA-EMP999.
000410
000411 400-TRANSACTION-COMPLETE.Because the Diagnostic Summary indicates that the last EXEC CICS command begins at statement number 000369, use the UP PF key to scroll up to that statement. Because the Last 3270 Screen Image indicates that 00001 was entered as the employee number and because the Diagnostic Summary indicates that the abending statement is contained in 300-EMPLOYEE-PAY-RTN, you can conclude that statement numbers 378 through 380 are the previous instructions executed prior to the abending statement. The invalid data in the WA-HOURS field, which is part of the WORK-AREA group name, was placed there by the MOVE statement, 379. This MOVE statement placed data located in the group name PAYROLL-DATA-EMP001 into the group name WORK-AREA.
Program Listing — Last EXEC CICS Command
Abend-AID ------------------- Program Listing ----------- Row 000070 of 000287
COMMAND ===> f payroll-data-emp001 SCROLL ===> PAGE
==>
Program............... CCAADEMO
Program Compile Date.. 12JUL2019Source Listing Date... 12JUL2019
Program Compile Time.. 15:58:26 Source Listing Time... 15:58:26
To reset display to the abending/last executed statement, select RESET
To reset display to the point of entry into this listing, select ENTRY
Source Line
*******************************************************************************
000369 *EXEC CICS RECEIVE
000370 * INTO (DUMMY-EMP)
000371 * LENGTH (DUMMY-LEN)
000372 *END-EXEC.
000373 MOVE ’........... ...00282 ’ TO DFHEIV0
000374 CALL ’DFHEI1’ USING DFHEIV0 DUMMY-EMP DUMMY-LEN.
000375
000376
000377 MOVE DUMMY-PAYEMP1 TO PAYEMP1.
000378 IF PAYEMP1 EQUAL ’00001’
000379 MOVE PAYROLL-DATA-EMP001 TO WORK-AREA
000380 GO TO 300-EMPLOYEE-PAY-RTN.Next, enter the FIND PAYROLL-DATA-EMP001 primary command to locate this group name, as shown in the following figure:
Program Listing Screen — Working Storage — Group Name
Abend-AID ------------------- Program Listing ----------- Row 000017 of 000307
COMMAND ===> SCROLL ===> PAGE
==>
Program............... CCAADEMO
Program Compile Date.. 12JUL2019Source Listing Date... 12JUL2019
Program Compile Time.. 15:58:26 Source Listing Time... 15:58:26
To reset display to the abending/last executed statement, select RESET
To reset display to the point of entry into this listing, select ENTRY
Source Line
*******************************************************************************
02 FILLERS9(1)COMP-3+8
02 FILLER X LOW-VALUES
01 WS-130 S9(3) COMP-3 +130
01 WS-130-X REDEFINES WS-130
02 WS-13 X X’13’
02 WS-0C X X’0C’
01 PAYROLL-DATA-EMP001
02 PAY001-TYPE X N
02 PAY001-NAME X(15) MR. DAVID ABEND
02 PAY001-ADDRESS
03 PAY001-STREET X(12) 456 MAIN ST.Because WA-HOURS was the second to last field under WORK-AREA, press the DOWN PF key to locate the second to last field under PAYROLL-DATA-EMP001, which is PAY001-HOURS. The data in this field was moved to WA-HOURS.
Program Listing Screen — Working Storage — Invalid Data
Abend-AID ------------------- Program Listing ----------- Row 000033 of 000307
COMMAND ===> SCROLL ===> PAGE
==>
Program............... CCAADEMO
Program Compile Date.. 12JUL2019Source Listing Date... 12JUL2019
Program Compile Time.. 15:58:26 Source Listing Time... 15:58:26
To reset display to the abending/last executed statement, select RESET
To reset display to the point of entry into this listing, select ENTRY
Source Line
*******************************************************************************
03 PAY001-DTEFF-MM XX 01
03 PAY001-DTEFF-DD XX 01
03 PAY001-DTEFF-YY XX 84
02 PAY001-LST-PCT 9(3)V9 0110
02 PAY001-TAX-RAT 9(3)V9 0200
02 PAY001-YTD-GRS S9(5)V99 +1500000
02 PAY001-YTD-TAX S9(5)V99 +0300000
02 PAY001-HOURS XXX ***
02 PAY001-MSG X(26) SPACES
01 PAYROLL-DATA-EMP999
02 PAY999-TYPE X I
02 PAY999-NAME X(15) MR. JOHN DOE- Note that PAY001-HOURS is defined as alphanumeric, XXX, and was initialized to ’***’. However, this data was moved to WA-HOURS, which is a numeric field. To correct the invalid data and resolve the abend, change PAY001-HOURS to a numeric field, 999, and initialize it to a numeric value.