S0C4 - how to locate line of code that causes it



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

S0C4 - how to locate line of code that causes it

Postby stevefs » Sun Jul 13, 2008 7:23 am

I'm trying to figure out what line of code is cause a SOC4. I see the address from the sdsf outout. This client does not have anything like dumpmaster so I'm not sure what to do with the address and offset. When I do a fine on this in the output there is no displayable data.

The program itself is quite simple - reads in two flat files, checks a bunch of conditions, writes out a message
The soc4 ALWAYS occurs after reading the 50th record, no matter what the data is. I've put in display and can verify that it reads exactly 50 records and dies.
I even tried running with the same input reccord - a made a file with 100 copies of the same record. I know that it processes this record okay. Again, it abended on the 50th record.

The only thing unusually about this program is that one of the input files has a fixed block record length of 28500. I'm thinking that the Soc4 is a storage issue because of the size of the input record. Maybe I need to do something with the block size or the region size? block size right now is equal to one record
stevefs
 
Posts: 3
Joined: Sun Jul 13, 2008 4:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: S0C4 - how to locate line of code that causes it

Postby dick scherrer » Sun Jul 13, 2008 7:44 am

Hello stevefs and welceme to the forums,

Does the program have any arrays, called subroutines, or the internal sort?

It sounds like the code is "walking on storage" and it takes 50 times thru "something" to actually abend. The problem is probably well before the abend making chasing addresses less than productive.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: S0C4 - how to locate line of code that causes it

Postby stevefs » Sun Jul 13, 2008 8:07 am

the "program" is actually a progam that calls another program. they are statically linked. The calling program doesn't do anything, just reads in a record , calls the other program, writes a response , reads the next record, calls program 2, etc. until end of file. The called program does all the work, getting its input files passed in linkage from the first program. There are a couple of occurs clauses, but no arrays or sorts or other subprograms. The called program logic only looks at the first occurence of data in two of the occurs clauses. One of the suggested causes in the abend was reading past end of file, but I put displays after reading both input files and this is not the case, unless its confused and things it reach end of file
stevefs
 
Posts: 3
Joined: Sun Jul 13, 2008 4:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: S0C4 - how to locate line of code that causes it

Postby dick scherrer » Sun Jul 13, 2008 9:07 am

Hello,

Are these new modules? Have they ever worked together? What was the last change to either?

getting its input files
Records, maybe? Does the called module do any i/o?

You might replace the called module with a clone that is the same "structure" but does no work. Have the replacement clone simply display a couple values from the caller's data and GOBACK - doing NO real work and see what happens.

Someone has ensured that the calling parameter list and the lnkage/parameter area in the called module are exactly the same? Is there an array in the passed parameters? Is this incremented while processing in the called modle?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: S0C4 - how to locate line of code that causes it

Postby stevefs » Sun Jul 13, 2008 9:15 pm

I got the program working, however the solution makes no sense to me
I just increased the size of the output file and now it works
I don't understand why I was getting a Soc4. I would think I would get a B37
Maybe a Soc4 because the program getting writing after it ran out of space
Anyway, its working
Thanks for all your help
S
stevefs
 
Posts: 3
Joined: Sun Jul 13, 2008 4:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: S0C4 - how to locate line of code that causes it

Postby dick scherrer » Sun Jul 13, 2008 11:15 pm

You're welcome :)

Sounds like the original abend was "masked" somehow and 0c4 is what caused the run to "leave the building".

Good to hear it is working.

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post