Divide-by-zero error

Figure 1 demonstrates a divide-by-zero error. In this example, the main Enterprise PL/I routine passed bad data to an Enterprise PL/I subroutine. The bad data in this example is 0, and the error occurred when the subroutine SUB1 attempted to use this data as a divisor.

Figure 1. Enterprise PL/I routine with a divide-by-zero error
5655-H31  IBM(R) Enterprise PL/I for z/OS       V3.R6.M0 (Built:20070119)              2007.01.31 16:02:31   Page     1     
                     Options Specified                                                                                              
  Install:                                                                                                                          
  Command:                                                                                                                          
  Line.File Process Statements                                                                                                      
     1.0    *PROCESS  GONUMBER LIST S STG TEST MAP;                                                                                 
  Install:                                                                                                                          
5655-H31  IBM(R) Enterprise PL/I for z/OS       SAMPLE: PROC  OPTIONS(MAI              2007.01.31 16:02:31   Page     2     
 Compiler Source                                                                                                                    
    Line.File                                                                                                                       
       2.0      SAMPLE: PROC  OPTIONS(MAIN) ;                                                                                       
       3.0           On error                                                                                                       
       4.0             begin;                                                                                                       
       5.0               On error system;        /* prevent nested error conditions */                                              
       6.0               Call PLIDUMP('TBC','PLIDUMP called from error ON-unit');                                                   
       7.0               Put Data;               /* Display variables */                                                            
       8.0           End;                                                                                                           
       9.0                                                                                                                          
      10.0           DECLARE                                                                                                        
      11.0             A_number    Fixed Bin(31),                                                                                   
      12.0             My_Name     Char(13),                                                                                        
      13.0             An_Array(3) Fixed Bin(31) init(1,3,5);                                                                       
      14.0                                                                                                                          
      15.0           Put skip list('Sample Starting');                                                                              
      16.0           A_number = 0;                                                                                                  
      17.0           My_Name = 'Tery Gillaspy';                                                                                     
      18.0                                                                                                                          
      19.0           Call Sub1(a_number, my_name, an_array);                                                                        
      20.0                                                                                                                          
      21.0        SUB1:  PROC(divisor, name1, Array1);                                                                              
      22.0              Declare                                                                                                     
      23.0               Divisor   Fixed Bin(31),                                                                                   
      24.0               Name1     Char(13),                                                                                        
      25.0               Array1(3) Fixed Bin(31);                                                                                   
      26.0               Put skip list('Sub1 Starting');                                                                            
      27.0               Array1(1) = Array1(2) / Divisor;                                                                           
      28.0               Put skip list('Sub1 Ending');                                                                              
      29.0        End SUB1;                                                                                                         
      30.0                                                                                                                          
      31.0          Put skip list('Sample Ending');                                                                                 
      32.0                                                                                                                          
      33.0      End;                                                                                                                
⋮      

Because variables are not usually displayed in a PLIDUMP dump, this routine included a PUT DATA statement, which generated a listing of arguments and variables used in the routine. Figure 2 shows this output.

Figure 2. Variables from routine SAMPLE (Enterprise PL/I)
1Sample Starting
 Sub1 Starting        A_NUMBER=             0 MY_NAME='Tery Gillaspy' AN_ARRAY(1)=  1
 AN_ARRAY(2)=          3                      AN_ARRAY(3)=             5;

The routine in Figure 1 was compiled with the LIST compiler option, which generated the object code listing shown in Figure 3.

Figure 3. Object code listing from example Enterprise PL/I routine
⋮                                                                                                                                   
5655-H31  IBM(R) Enterprise PL/I for z/OS    SAMPLE: PROC  OPTIONS(MAI  : SUB1        2007.01.31 16:02:31   Page     5     
                                                                                                                                    
OFFSET OBJECT CODE        LINE#  FILE#    P S E U D O   A S S E M B L Y   L I S T I N G                                             
                                                                                                                                    
000000                    000021 |        SUB1     DS    0D                                                                         
000000  47F0  F022        000021 |                 B     34(,r15)                                                                   
000004  01C3C5C5                                         CEE eyecatcher                                                             
000008  00000160                                         DSA size                                                                   
00000C  00000848                                         =A(PPA1-SUB1)                                                              
⋮                                                                                                                                   
000136  5820  D14C        000027 |                 L     r2,#SR_PARM_3(,r13,332)                                                    
00013A  5820  2008        000027 |                 L     r2,_addrARRAY1(,r2,8)                                                      
00013E  5840  2000        000027 |                 L     r4,_shadow1(,r2,0)                                                         
000142  5820  D14C        000027 |                 L     r2,#SR_PARM_3(,r13,332)                                                    
000146  5820  2008        000027 |                 L     r2,_addrARRAY1(,r2,8)                                                      
00014A  5820  2004        000027 |                 L     r2,_shadow1(,r2,4)                                                         
00014E  5040  D150        000027 |                 ST    r4,#wtemp_1(,r13,336)                                                      
000152  5020  D144        000027 |                 ST    r2,_temp15(,r13,324)                                                       
000156  5820  D144        000027 |                 L     r2,_temp15(,r13,324)                                                       
00015A  5850  2004        000027 |                 L     r5,_shadow2(,r2,4)                                                         
00015E  5840  D150        000027 |                 L     r4,#wtemp_1(,r13,336)                                                      
000162  5820  D144        000027 |                 L     r2,_temp15(,r13,324)                                                       
000166  5820  2000        000027 |                 L     r2,_shadow2(,r2,0)                                                         
00016A  1382              000027 |                 LCR   r8,r2                                                                      
00016C  5820  D14C        000027 |                 L     r2,#SR_PARM_3(,r13,332)                                                    
000170  5820  2008        000027 |                 L     r2,_addrARRAY1(,r2,8)                                                      
000174  5890  2000        000027 |                 L     r9,_shadow1(,r2,0)                                                         
000178  5820  D14C        000027 |                 L     r2,#SR_PARM_3(,r13,332)                                                    
00017C  5820  2008        000027 |                 L     r2,_addrARRAY1(,r2,8)                                                      
000180  5820  2004        000027 |                 L     r2,_shadow1(,r2,4)                                                         
000184  5090  D154        000027 |                 ST    r9,#wtemp_2(,r13,340)                                                      
000188  1E58              000027 |                 ALR   r5,r8                                                                      
00018A  4145  4000        000027 |                 LA    r4,#AddressShadow(r5,r4,0)                                                 
00018E  5040  D158        000027 |                 ST    r4,#wtemp_3(,r13,344)                                                      
000192  5020  D140        000027 |                 ST    r2,_temp14(,r13,320)                                                       
000196  5820  D140        000027 |                 L     r2,_temp14(,r13,320)                                                       
00019A  5840  2004        000027 |                 L     r4,_shadow2(,r2,4)                                                         
00019E  8940  0001        000027 |                 SLL   r4,1                                                                       
0001A2  5820  D154        000027 |                 L     r2,#wtemp_2(,r13,340)                                                      
0001A6  5850  D140        000027 |                 L     r5,_temp14(,r13,320)                                                       
0001AA  5850  5000        000027 |                 L     r5,_shadow2(,r5,0)                                                         
0001AE  1355              000027 |                 LCR   r5,r5                                                                      
0001B0  1E45              000027 |                 ALR   r4,r5                                                                      
0001B2  5884  2000        000027 |                 L     r8,_shadow2(r4,r2,0)                                                       
0001B6  5820  D14C        000027 |                 L     r2,#SR_PARM_3(,r13,332)                                                    
0001BA  5820  2000        000027 |                 L     r2,_addrDIVISOR(,r2,0)                                                     
0001BE  5820  2000        000027 |                 L     r2,_shadow2(,r2,0)                                                         
0001C2  8E80  0020        000027 |                 SRDA  r8,32                                                                      
0001C6  1D82              000027 |                 DR    r8,r2                                                                      
0001C8  1849              000027 |                 LR    r4,r9                                                                      
0001CA  5820  D158        000027 |                 L     r2,#wtemp_3(,r13,344)                                                      
0001CE  5040  2000        000027 |                 ST    r4,_shadow2(,r2,0)                                                         
⋮          

Figure 4 shows the Language Environment dump for routine SAMPLE.

Figure 4. Language Environment dump from example Enterprise PL/I routine (Part 1 of 2)
CEE3DMP V1 R12.0: PLIDUMP called from error ON-unit                                 03/13/10 4:02:34 PM                  Page:    1  
ASID: 0142   Job ID: J0009418   Job name: LEDGSMP3   Step name: GO         UserID: BARBARA                                          
                                                                                                                                    
CEE3845I CEEDUMP Processing started.                                                                                                
PLIDUMP was called from statement number 6 at offset +000000D4 from _ON_Begin_4_Blk_2 with entry address 11200340                   
                                                                                                                                    
Information for enclave SAMPLE                                                                                                      
                                                                                                                                    
  Information for thread 8000000000000000                                                                                           
                                                                                                                                    
  Traceback:                                                                                                                        
    DSA   Entry       E  Offset  Statement   Load Mod             Program Unit                   Service  Status                    
    1     IBMPDUMP    +000002AE              IBMPEV11                                            PQ78306  Call                      
    2     _ON_Begin_4_Blk_2                                                                                                         
                      +000000D4  6           SAMPLE               SUB1                                    Call                      
    3     IBMPEONR    +000002A2              IBMPEV11                                            PQ76426  Call                      
    4     IBMPEBOP    +000004DC              IBMPEV11                                            LE19BAS  Call                      
    5     CEEEV011    +00000132              IBMPEV11             CEEEV011                                Call                      
    6     CEEHDSP     +000017D0              CEEPLPKA             CEEHDSP                        D1908    Call                      
    7     SUB1        +000001C6  27          SAMPLE               SUB1                                    Exception  
    8     SAMPLE      +000001CA  19          SAMPLE               SUB1                                    Call                      
    9     IBMPMINV    +000004DE              IBMPEV11             IBMPMINV                                Call                      
    10    CEEEV011    +00000202              IBMPEV11             CEEEV011                                Call                      
    11    CEEBBEXT    +000001B6              CEEPLPKA             CEEBBEXT                       D1908    Call                      
                                                                                                                                    
    DSA   DSA Addr   E  Addr    PU Addr    PU Offset  Comp Date  Compile Attributes                                                 
    1     11A3ED08   114A5E38   114A5E38   +000002AE  20061214   LIBRARY   EBCDIC  HFP                                              
    2     11A3EBB0   11200340   112000D0   +00000344  20070131   ENT PL/I EBCDIC  HFP                                               
    3     11A3EA18   114A8B98   114A8B98   +000002A2  20061214   LIBRARY   EBCDIC  HFP                                              
    4     11A3E848   114B0390   114B0390   +000004DC  20061214   LIBRARY   EBCDIC  HFP                                              
    5     11A3E7B8   114072E8   114072E8   +00000132  20061214   LIBRARY                                                            
    6     11A3B698   112C4238   112C4238   +000017D0  20061215   CEL                                                                
    7     11A3B538   112000D0   112000D0   +000001C6  20070131   ENT PL/I EBCDIC  HFP                                               
    8     11A3B3B8   112004B8   112000D0   +000005B2  20070131   ENT PL/I EBCDIC  HFP                                               
    9     11A3B180   114DE990   114DE990   +000004DE  20061214   LIBRARY                                                            
    10    11A3B0F0   114072E8   114072E8   +00000202  20061214   LIBRARY                                                            
    11    11A3B030   11292208   11292208   +000001B6  20061215   CEL                                                                
                                                                                                                                    
  Condition Information for Active Routines                                                                                         
    Condition Information for SUB1 (DSA address 11A3B538)                                                                           
      CIB Address: 11A3BFB8                                                                                                         
      Current Condition:                                                                                                            
        IBM0281S A prior condition was promoted to the ERROR condition.                                                             
      Original Condition:                                                                                                           
        CEE3209S The system detected a fixed-point divide exception (System Completion Code=0C9).           
      Location:                                                                                                                     
        Program Unit: SUB1 Entry: SUB1 Statement: 27 Offset: +000001C6                                                              
      Machine State:                                                                                                                
        ILC..... 0002    Interruption Code..... 0009                                                                                
        PSW..... 078D2600 91200298                                                                                                  
        GPR0..... 0000000_00000001  GPR1..... 0000000_00004A48  GPR2..... 0000000_00000000  GPR3..... 0000000_1120010A  
        GPR4..... 0000000_00000004  GPR5..... 0000000_FFFFFFFC  GPR6..... 0000000_11200BA8  GPR7..... 0000000_11200748           
        GPR8..... 0000000_00000000  GPR9..... 0000000_00000003  GPR10.... 0000000_11A3B0B0  GPR11.... 0000000_11200FE4           
        GPR12.... 0000000_112139B0  GPR13.... 0000000_11A3B538  GPR14.... 0000000_912001FE  GPR15.... 0000000_1153CF40           
        FPC...... F0000000                                                                                                          
        FPR0..... 26100000  00000000            FPR1..... 00000000  00000000                                                        
        FPR2..... 18000000  00000000            FPR3..... 00000000  00000000                                                        
        FPR4..... 00000000  00000000            FPR5..... 00000000  00000000                                                        
        FPR6..... 00000000  00000000            FPR7..... 00000000  00000000                                                        
        FPR8..... 00000000  00000000            FPR9..... 00000000  00000000                                                        
        FPR10.... 00000000  00000000            FPR11.... 00000000  00000000                                                        
        FPR12.... 00000000  00000000            FPR13.... 00000000  00000000                                                        
        FPR14.... 00000000  00000000            FPR15.... 00000000  00000000                                                        
        Start of changeVR0...... 26100000 00000000 00000000 00000000        VR1...... 00000000 00000000 00000000 00000000
        VR2...... 18000000 00000000 00000000 00000000        VR3...... 00000000 00000000 00000000 00000000
        VR4...... 00000000 00000000 00000000 00000000        VR5...... 00000000 00000000 00000000 00000000
        VR6...... 00000000 00000000 00000000 00000000        VR7...... 00000000 00000000 00000000 00000000
        VR8...... 00000000 00000000 00000000 00000000        VR9...... 00000000 00000000 00000000 00000000
        VR10..... 00000000 00000000 00000000 00000000        VR11..... 00000000 00000000 00000000 00000000
        VR12..... 00000000 00000000 00000000 00000000        VR13..... 00000000 00000000 00000000 00000000
        VR14..... 00000000 00000000 00000000 00000000        VR15..... 00000000 00000000 00000000 00000000
        VR16..... 00000000 00000000 00000000 00000000        VR17..... 00000000 00000000 00000000 00000000
        VR18..... 00000000 00000000 00000000 00000000        VR19..... 00000000 00000000 00000000 00000000
        VR20..... 00000000 00000000 00000000 00000000        VR21..... 00000000 00000000 00000000 00000000
        VR22..... 00000000 00000000 00000000 00000000        VR23..... 00000000 00000000 00000000 00000000
        VR24..... 00000000 00000000 00000000 00000000        VR25..... 00000000 00000000 00000000 00000000
        VR26..... 00000000 00000000 00000000 00000000        VR27..... 00000000 00000000 00000000 00000000
        VR28..... 00000000 00000000 00000000 00000000        VR29..... 00000000 00000000 00000000 00000000
        VR30..... 00000000 00000000 00000000 00000000        VR31..... 00000000 00000000 00000000 00000000 End of change                                                                                                                           
    Storage dump near condition, beginning at location: 11200286                                                                    
      +000000 11200286  5820D14C 58202000 58202000 8E800020  1D821849 5820D158 50402000 4400C1AC  |..J<.............b....J.& ....A.|
⋮       
Figure 5. Language Environment dump from example Enterprise PL/I routine (Part 2 of 2)
  Control Blocks for Active Routines:                                                                                               
⋮                                                                                                                                     
    DSA for CEEHDSP: 11A3B698                                                                                                       
      +000000  FLAGS.... 0808      member... CEE1      BKC...... 11A3B538  FWC...... 11A3E7B8  R14...... 912C5A0A                   
      +000010  R15...... 914072E8  R0....... 00000010  R1....... 1120C2E8  R2....... 11A3BFB8  R3....... 11A3B3B8                   
      +000024  R4....... 112C8E64  R5....... FFFFFF30  R6....... 00000001  R7....... 00000007  R8....... 912C5712                   
      +000038  R9....... 11A3D696  R10...... 11A3C697  R11...... 112C4238  R12...... 112139B0  reserved. 00000000                   
      +00004C  NAB...... 11A3E7B8  PNAB..... 11A3B874  reserved. 11A3B9D8  00000000                                                 
      +000064  reserved. 11A3BE58  reserved. 00000000  MODE..... 00000000  reserved. 00000000                                       
      +000078  reserved. 00000000  reserved. 00000000                                                                               

    DSA for SUB1: 11A3B538                                                                                                          
      +000000  FLAGS.... 10A3      member... B0F0      BKC...... 11A3B3B8  FWC...... 11A3B5F8  R14...... 912001FE                   
      +000010  R15...... 11537648  R0....... 11A3B668  R1....... 11A3B5D0  R2....... 00000001  R3....... 1120010A                   
      +000024  R4....... 00004A48  R5....... 11A3B3B8  R6....... 11200BA8  R7....... 11200748  R8....... 11A3B528                   
      +000038  R9....... 11A3B484  R10...... 11A3B0B0  R11...... 11200FE4  R12...... 112139B0  reserved. 00000000                   
      +00004C  NAB...... 11A3B698  PNAB..... 00000000  reserved. 00000000  00000000                                                 
      +000064  reserved. 00000000  reserved. 00000002  MODE..... 1120ADB0  reserved. 00000000                                       
      +000078  reserved. 00000000  reserved. 112D96E0                                                                               
    CIB for SUB1: 11A3BFB8                                                                                                          
      +000000 11A3BFB8  C3C9C240 00000000 00000000 010C0004  00000001 00000000 00030119 59C9C2D4  |CIB .........................IBM|
      +000020 11A3BFD8  00000000 11A3C0C8 00030C89 59C3C5C5  00000001 00000005 11A3B3B8 914072E8  |.....t.H...i.CEE.........t..j .Y|
      +000040 11A3BFF8  00000000 11A3B538 11200298 1120C6F0  0000000B 11A3B538 00000000 00000000  |.....t.....q..F0.....t..........|
      +000060 11A3C018  00000000 00000000 11A64240 00000015  00000011 00000001 117537B0 00000011  |.........w. ....................|
      +000080 11A3C038  11200FE4 112139B0 00000000 11A3C0B0  114F9EBA 11A3C138 114F4338 00000007  |...U.........t...|...tA..|......|
      +0000A0 11A3C058  00000000 11A3C0F8 11A3C104 004F4327  44230000 940C9000 00000009 00000000  |.....t.8.tA..|......m...........|
      +0000C0 11A3C078  00000000 11200918 11A3B538 11A3B538  11200296 00000000 0000000A 00000001  |.........t...t.....o............|
      +0000E0 11A3C098  11A3B3B8 0000000B 00000064 00000014  00000003 00000000 10000000 00000000  |.t..............................|
      +000100 11A3C0B8  00000000 1120C908 11A3C104 11A3C0F8  E9D4C3C8 02000001 00000001 00004A48  |......I..tA..t.8ZMCH............|
    Dynamic save area (SUB1): 11A3B538                                                                                              
      +000000 11A3B538  10A3B0F0 11A3B3B8 11A3B5F8 912001FE  11537648 11A3B668 11A3B5D0 00000001  |.t.0.t...t.8j........t...t......|
      +000020 11A3B558  1120010A 00004A48 11A3B3B8 11200BA8  11200748 11A3B528 11A3B484 11A3B0B0  |.........t.....y.....t...t.d.t..|
      +000040 11A3B578  11200FE4 112139B0 00000000 11A3B698  00000000 00000000 00000000 00000000  |...U.........t.q................|
      +000060 11A3B598  00000000 00000000 00000002 1120ADB0  00000000 80010000 00000000 112D96E0  |..............................o.|
      +000080 11A3B5B8  00000000 00000000 00000000 00000000  00000000 00000000 11A3B668 00000000  |.........................t......|
      +0000A0 11A3B5D8  00000000 00000000 00180280 11A3B538  11A3B460 11200EE8 11A3B520 11A3B528  |.............t...t.-...Y.t...t..|
      +0000C0 11A3B5F8  11A3B484 00000001 00000000 00000000  00000000 000005D8 112008D8 112008A4  |.t.d...................Q...Q...u|
      +0000E0 11A3B618  11200BC8 9153CE54 115476F8 00004A48  4A480100 01A30000 11A5CB38 00000001  |...Hj......8.........t...v......|
      +000100 11A3B638  11A5CB38 00000000 11200748 11212648  00000008 11A3B0B0 11200FE4 40404040  |.v...................t.....U    |
      +000120 11A3B658  00000000 11A3B7E0 40404040 40404040  40404040 11200CBC 11A3B5FC 40404040  |.....t..            .....t..    |
      +000140 11A3B678  11200C50 11200C50 11A3B3B8 11A3B450  11A3B498 11A3B498 11A3B498 00000010  |...&...&.t...t.&.t.q.t.q.t.q....|
    DSA for SAMPLE: 11A3B3B8                                                                                                        
      +000000  FLAGS.... 10A3      member... B12C      BKC...... 11A3B180  FWC...... 11A3B138  R14...... 91200684                   
      +000010  R15...... 112000D0  R0....... 11A3B520  R1....... 11A3B450  R2....... 00000001  R3....... 112004F2                   
      +000024  R4....... 00004A48  R5....... 11A3B3B8  R6....... 11200BA8  R7....... 11200748  R8....... 11A3B528                   
      +000038  R9....... 11A3B484  R10...... 11A3B0B0  R11...... 11200FE4  R12...... 112139B0  reserved. 00000000                   
      +00004C  NAB...... 11A3B538  PNAB..... 00000000  reserved. 00000000  00000000                                                 
      +000064  reserved. 00000000  reserved. 00000000  MODE..... 00000000  reserved. 00000000                                       
      +000078  reserved. 00000000  reserved. 00000000                                                                               
    Dynamic save area (SAMPLE): 11A3B3B8                                                                                            
      +000000 11A3B3B8  10A3B12C 11A3B180 11A3B138 91200684  112000D0 11A3B520 11A3B450 00000001  |.t...t...t..j..d.....t...t.&....|
      +000020 11A3B3D8  112004F2 00004A48 11A3B3B8 11200BA8  11200748 11A3B528 11A3B484 11A3B0B0  |...2.....t.....y.....t...t.d.t..|
      +000040 11A3B3F8  11200FE4 112139B0 00000000 11A3B538  00000000 00000000 00000000 00000000  |...U.........t..................|
      +000060 11A3B418  00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000  |................................|
      +000080 11A3B438  00000000 00000000 00000000 00000000  00000000 00000000 11A3B484 11A3B528  |.........................t.d.t..|
      +0000A0 11A3B458  11A3B520 00000000 00100000 00000000  00180180 11A3B3B8 00000000 11200E68  |.t...................t..........|
      +0000C0 11A3B478  0B300000 11200340 11A3B3B8 00000000  E38599A8 40C78993 9381A297 A8000000  |....... .t......Tery Gillaspy...|
      +0000E0 11A3B498  00000001 00000003 00000005 00000001  88000000 11A3B030 11A3B7D8 9140755E  |................h....t...t.Qj .;|
      +000100 11A3B4B8  112008A8 112008A4 11200BD0 11A3B0F0  914072E8 112014D8 4A480100 01000000  |...y...u.....t.0j .Y...Q........|
      +000120 11A3B4D8  11A5CB38 00000001 112014D8 00000000  11A3B308 112139B0 00000000 11A3B538  |.v.........Q.....t...........t..|
      +000140 11A3B4F8  00000000 00000000 00000000 00000000  00000000 00000000 00000000 11200CBC  |................................|
      +000160 11A3B518  11A3B4A4 00000000 11A3B498 11200C50  11A3B488 000D0002 11A3B4A0 00000000  |.t.u.....t.q...&.t.h.....t......|
    ENTERPRISE PL/I OPTIONS:                                                                                                        
     AFP, ARCH( 5), BACKREG(5), BIFPREC(15), CHECK(NOCONFORMANCE, NOSTORAGE), CMPAT(V2), CODEPAGE( 1140), COMMON,                   
     NOCOMPACT, CSECT, CSECTCUT( 4) CURRENCY( $), NODBCS, DECIMAL( FOFLONASGN, NOFORCEDSIGN), DEFAULT( IBM, ASSIGNABLE,             
     NOINITFILL, NONCONNECTED, DESCRIPTOR, DESCLOCATOR, DUMMY(ALIGNED), ORDINAL(MIN), BYADDR, RETURNS(BYADDR),                      
     LINKAGE(OPTLINK), NORETCODE, NOINLINE, ORDER, NOOVERLAP, NONRECURSIVE, ALIGNED, NULL370, EVENDEC, SHORT(HEXADEC),              
     EBCDIC, HEXADEC, NATIVE, NATIVEADDR, E(HEXADEC) ), DISPLAY(WTO), NODLLINIT, EXTRN(FULL), NOGRAPHIC, NOINITAUTO,                
     NOINITBASED, NOINITCTL, NOINITSTATIC, NOINTERRUPT, LIMITS( EXTNAME( 7), FIXEDBIN( 31, 31), FIXEDDEC( 15, 15), NAME( 100        
     )), OPTIMIZE( 0), PREFIX( CONVERSION, FIXEDOVERFLOW, INVALIDOP, OVERFLOW, PRECTYPE(ANS), NOSIZE, NOSTRINGRANGE,                
     NOSTRINGSIZE, NOSUBSCRIPTRANGE, UNDERFLOW, ZERODIVIDE), REDUCE, NORENT, RESEXP, RESPECT(), RULES(IBM), NOSTDSYS,               
     NOSCHEDULER, STRINGOFGRAPHIC(GRAPHIC), SYSTEM(MVS), TEST(ALL ,SYM ,HOOK ,NOSEPARATE), TUNE( 5), USAGE( ROUND(IBM),             
     UNSPEC(IBM)), WIDECHAR(BIGENDIAN), WINDOW( 1950), WRITABLE, XINFO(NODEF, NOXML)                                                
    Static for procedure SAMPLE    Timestamp: 2007.01.31 16:02:31 V03.R06.M00: 11200BA8                                             
      +000000 11200BA8  11201750 11200CBC 000D0002 00000000  02020240 00000003 02020240 0000000B  |...&............... ....... ....|
      +000020 11200BC8  02020240 0000000D 02020240 0000000F  02020240 00000021 00000000 11200C00  |... ....... ....... ............|
      +000040 11200BE8  00000000 11200CA8 00000000 11200E18  00000000 11200C00 00000000 11200C08  |.......y........................|
      +000060 11200C08  00000000 00000000 31010001 00000000  00000000 00000000 31000001 00000000  |................................|
⋮           

To understand the dump information and debug this routine, use the following steps:

  1. Notice the title of the dump: PLIDUMP called from error ON-unit. This was the title specified when PLIDUMP was invoked, and it indicates that the ERROR condition was raised and PLIDUMP was called from within the ERROR ON-unit.
  2. Locate the messages in the Condition Information section of the dump.

    There are two messages. The current condition message indicates that a prior condition was promoted to the ERROR condition. The promotion of a condition occurs when the original condition is left unhandled (no Enterprise PL/I ON-units are assigned to gain control). The original condition message is CEE3209S The system detected a fixed-point divide exception. The original condition usually indicates the actual problem. For more information about this message, see z/OS Language Environment Runtime Messages.

  3. In the traceback section, note the sequence of calls in the call chain. SAMPLE called SUB1 at statement 19, and SUB1 raised an exception at statement 27, PU offset X'1C6'.
  4. Find the statement in the listing for SUB1 that raised the ZERODIVIDE condition. If SUB1 was compiled with GOSTMT and SOURCE, find statement 27 in the source listing.

    Since the object listing was generated in this example, you can also locate the actual assembler instruction causing the exception at offset X'1C6' in the object listing for this routine, shown in Figure 3. Either method shows that divisor was loaded into register 2 (r2) and used as the divisor in a divide operation.

  5. You can see from the declaration of SUB1 that divisor is a parameter passed from SAMPLE. Because of linkage conventions, you can infer that register 1 in the SAMPLE save area points to a parameter list that was passed to SUB1. divisor is the first parameter in the list.
  6. In the SAMPLE DSA, the R1 value is X'11A3B450'. This is the address of the parameter list, which is located in static storage.
  7. Find the parameter list in the stack frame; the address of the first parameter is X'11A3B484' and the value of the first parameter is X'00000000'. Thus, the exception occurred when SAMPLE passed a 0 value used as a divisor in subroutine SUB1.