S0C4 ABEND in Sub Program



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

S0C4 ABEND in Sub Program

Postby gopal_NKP » Wed Feb 29, 2012 1:06 pm

Hi,

I have one main COBOL program and some sub programs.
The program is abending in one of the sub programs with SOC4 abend while performing the move statement.

The input file is a multiple set of records, each record set with different type of records.

When we split up the record set (a record set is a set of type of records, the record which causing the abend is in this record set) which is causing the abend into another file and give these two piles in input DD, then program is running fine and also
after compilation of the program also the job is running fine with the same input file (without split up of the file).

Please suggest.

Thanks in advance.
gopal_NKP
 
Posts: 22
Joined: Fri Feb 25, 2011 11:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby gopal_NKP » Wed Feb 29, 2012 1:08 pm

The program is abending in prod environment and when we re compile it in test, the program is running fine.
gopal_NKP
 
Posts: 22
Joined: Fri Feb 25, 2011 11:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby Anuj Dhawan » Wed Feb 29, 2012 5:12 pm

I'll hazard a guess - but what compiler options did you use in test and Prod to compile the program?
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby BillyBoyo » Wed Feb 29, 2012 7:24 pm

You have a program bug.

The inability to re-create it outside of production does not mean it is not a bug. It means you haven't got everything the same. This includes all input to your program (including reference files and DBs) as well as the driving file, in the original order. As Anuj has pointed out, the compiler options you have can even be relevant. The "correct" options will not make the program work, but the "incorrect" options can make it fail, rather than mess up and carry on.

So, tell us more about the MOVE in question.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby gopal_NKP » Thu Mar 01, 2012 3:50 pm

Hi,

Thanks for the help
Yes, you are correct. I am able to re-create the problem without SSRANGE compiler option. If SSRANGE=YES in compile, then not able to re-create the problem in test.
More info:

1. If a program is abending while processing a record (call it as REC30), I have ran the program again by removing the record (REC30=causing the abend initially) then it is abending in another record (REC28). So, it is not about a particular record.

The destination field has the occurs clause for 4 times.

Is this causing this abend?
gopal_NKP
 
Posts: 22
Joined: Fri Feb 25, 2011 11:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby BillyBoyo » Thu Mar 01, 2012 4:12 pm

Please post the relevant code, including data definitions. Can't say otherwise.

SSRANGE should not prevent an abend, it should abend itself if you access storage outside a Cobol table (occurs) with a subscript, index or reference-modification. It will provide information about the problem as well.

This would indicate that you still haven't recreated the situation in your test environment. Or, just possibly, you have managed to overwrite some code, and the inclusion of the SSRANGE code has made that overwriting in a less "vital" place or value. This is, however, unlikely. Don't bother looking into that until all more reasonable possibilities exhausted.

To try to recreate the problem, you need your compile options all the same as production.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby gopal_NKP » Thu Mar 01, 2012 5:01 pm

Hi,

This is the situation in cobol programs.

One main program(MP) calls a sub porgram (SP).

In SP, the reading of file happens. The file is read into the A record. Based on the A-type field value the record gets moved to different destination records which are of same length as A-record.

The destination field is declared in the Linkage section.
Only Group move is happening in the sub program.
There is no computation of fields and subscription based storing or accessing .
gopal_NKP
 
Posts: 22
Joined: Fri Feb 25, 2011 11:47 am
Has thanked: 0 time
Been thanked: 0 time

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby NicC » Thu Mar 01, 2012 6:10 pm

gopal_NKP - your last response seems to be totally irrelevant compared with what you were requested to provide. If you do not provide the requested information then no one can help you and you might as well not bother asking for help.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby Robert Sample » Thu Mar 01, 2012 6:13 pm

I am able to re-create the problem without SSRANGE compiler option. If SSRANGE=YES in compile, then not able to re-create the problem in test.
This is a CLUE. If you understand what SSRANGE is doing, then you will have gone a long way towards understanding the source of the problem as well as how to resolve it.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: SOC4 ABEND IN SUB PROGRAM WHILE PERFORMING THE MOVE STAT

Postby BillyBoyo » Thu Mar 01, 2012 9:10 pm

So, show the data definitions in the calling program, of all items on the USING of the CALL. Show the CALL as well. Show the LINKAGE SECTION and PROCEDURE DIVISIONS USING of the called program, and the code doing the READ and any MOVEs.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post