COBOL IF statement fails



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

COBOL IF statement fails

Postby jfdutcher » Tue Jun 02, 2015 8:43 pm

A failing COBOL program contains the following in the procedure mapping:

000475  IF                                                                     
   000F44  5850 912C               L     5,300(0,9)              BLW=0         
   000F48  5840 5090               L     4,144(0,5)              PARM-COUNT   
   000F4C  4940 A06C               CH    4,108(0,10)          PGMLIT AT +20
   000F50  47B0 BA42               BC    11,2626(0,11)       GN=48(000F7E)   


The register display from dumpmaster shows this:
  Entry point at 2D87FEE8                                                     
  Registers at abend                                                           
0 00000000_2E61060C 1 00000000_00000000 2 00000000_2E860210 3 00000000_2E813878
4 00000000_40404040 5 00000000_2E860290 6 00000000_2E610598 7 00000000_40404040
8 00000000_2E84F318 9 00000000_2E70D828 A 00000000_2D87FFFC B 00000000_2D880418
C 00000000_2D87FFE4 D 00000000_00055D70 E 00000000_2E84F324 F 00000000_40000000


Register 5 does contain the BLW value for working storage (2E860290) and the displacement for PARM-COUNT is correct at 144 (hex 90).
How is it conceivable for register 4 to be messed up and seemingly to be the cause of our OC4, when it just got properly loaded with the
address of PARM-COUNT ???
jfdutcher
 
Posts: 9
Joined: Mon Apr 28, 2014 10:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL IF statement fails

Postby BillyBoyo » Tue Jun 02, 2015 9:05 pm

The code you've shown is loading a value into a register and doing a compare on the content of the register. It is not using the register for addressing, so is not going to be the cause of a S0C4.

Have you located where the S0C4 is occuring?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: COBOL IF statement fails

Postby jfdutcher » Tue Jun 02, 2015 10:10 pm

DUMPMASTER is annoying...the call chain seems to suggest that both OQDSDSFE and OQDSDS00 failed with OC4:
Call chain (Top 3 user levels in chain of 15)
Program Language Last executed statement
. OQDSDSFE Cobol/zOS failed with Abend Code S0C4 at offset F50
. OQDSDS00 Cobol/zOS called OQDSDSFE from offset B1C
But the module name entry in DUMPMASTER was indeed OQDSDS00 not OQDSDSFE....he shows a different failing instruction:
Abend code = S0C4      PSW at time of abend = 478D1000 AD880E38               
                                                                               
Register contents at time of abend :                                           
0 00000000_2E61060C 1 00000000_00000000 2 00000000_2E860210 3 00000000_2E813878
4 00000000_40404040 5 00000000_2E860290 6 00000000_2E610598 7 00000000_40404040
8 00000000_2E84F318 9 00000000_2E70D828 A 00000000_2D87FFFC B 00000000_2D880418
C 00000000_2D87FFE4 D 00000000_00055D70 E 00000000_2E84F324 F 00000000_40000000
                                                                               
Access registers at time of abend :                                           
0-7   00000092 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
8-15  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
                                                                               
Failing instruction at 2D880E38 is at offset 00004E38 in program OQDSDS00     
                                                                               
Failing instruction is 5840700A - L     R4,10(,R7)                             

and register 7 seems to be suffering the same dilemma as register 4.
Oddly to me the offset to the failing instruction is said to be 4E38....but the compile listing offsets stop at DC8 and when
I simply search for either '5840 700A' or 'L R4,10(,R7)' both come up NOT FOUND
The one thing making sense to me is that the B1C offset in OQDSDS00 does indeed set up and call OQDSDSFE as noted in DUMPMASTER.
jfdutcher
 
Posts: 9
Joined: Mon Apr 28, 2014 10:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL IF statement fails

Postby BillyBoyo » Tue Jun 02, 2015 10:37 pm

It is sometimes possible to get multiple abends when there is not enough memory for the dump to be processed. If I see multiple abends, I always take the first one as the one causing the problem and ignore any others. Because I ignore them I can't remember what abend-code they tend to come up with :-)

Registers don't always contain addresses. When a register which should contain an address has X'40404040', or character data, or stuff which looks like part of a packed-decimal field, then that's a big hint at overwriting of the save area. I don't think you have that here.

The R7 is a problem, the source of your S0C4. If 0QDSDS00 is too "short" to contain that code, there is perhaps an Assembler module involved, which is located after that program. The misidentification of a COBOL program in that situation used to happen, I don't know if it still does :-)

What changes did you make to DS00, or anything it CALLs, or anything that CALLs it?

If the offset is 4E38 then a program whose final offset is DC8 is not the program that abended.

These users thanked the author BillyBoyo for the post:
arya_starc (Mon Sep 21, 2015 1:44 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: COBOL IF statement fails

Postby jfdutcher » Tue Jun 02, 2015 11:07 pm

Great input...thanks a lot.............
jfdutcher
 
Posts: 9
Joined: Mon Apr 28, 2014 10:53 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post