How to solve SOC7 abend ?



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

How to solve SOC7 abend ?

Postby sammouse » Thu Aug 06, 2009 11:51 am

Hi,
when i run my program it got abened with SOC7.Using offset address i found where it got abened.Then i put some display statements for the input records and i found the bad record.MY input is a GDG file it has around 50 versions in it.out of this 50 versions i found that,the 50 th version got fully corrputed.so i ran my program with the first 49 verions(like moving the first 49 verions from tape to disk ) and ir ran sucessfully...
when i ran my program with 50 th version alone it ran sucessfully ??? no idea why it ran ..but when i am running with all the 50 versions it is abending wit SOC7.can anyone please help me how to solve this...
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

 

Re: How to solve SOC7 abend ?

Postby swd » Thu Aug 06, 2009 2:49 pm

A difficult one to answer. I suspect that the problem is with the logic of your application program. Are you sure that the 50th GDG actually processed the records when you ran it on its own? perhaps it opened the file, but did not process the records due to some condition not being met when the GDG was processed on its own.

If you know the offending line of code that causes the S0C7, what is different about the contents of the fields when you run the 50th GDG on its own compared to when you run all 50 together? Have you displayed the values so you know for certain that it is processing the records when you run the 50th GDG on its own?
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

Postby sammouse » Thu Aug 06, 2009 3:01 pm

hi swd,
Thanks for your reply.
The 50th gdg is processed because it got abened at the last record.when i tried to delete the last record,it got abended with SOC7 for previous record and so on :(
But when i ran the 50 th version alone it ran sucessfully.no idea ??? :?: why it ran ...can you please help me regarding this?
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

Postby arunprasad.k » Thu Aug 06, 2009 4:18 pm

Just a blind guess!! Does your program has some OCCURS?? Might be an occurs overflow.

Also see which line its abending. How value is populated to that variable? Basically some analysis...

Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

Postby swd » Thu Aug 06, 2009 4:41 pm

Do you have a bebug tool such as Debugtool or Xpeditor. I suggest you step through the code as it's running to see what's going on this way you'll see why it's failing. It sounds like it's your program and without seeing the program it's difficult to suggest anything.
User avatar
swd
 
Posts: 109
Joined: Wed Feb 18, 2009 9:18 pm
Location: UK
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

Postby expat » Thu Aug 06, 2009 7:09 pm

/RANT ON

When talking about GDS it is important to use the correct terminology, as both version and generation are both valid in terms of a GDS.

It is a well known fact that only one version of a GDS may exist at any one time, however, multiple generations may exist together.

Please learn and use the correct terminology when posting, as using the wrong term can cause confusion and possibly delay a resolution to your problem

/RANT OFF
expat
 
Posts: 407
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 4 times

Re: How to solve SOC7 abend ?

Postby dick scherrer » Fri Aug 07, 2009 12:08 am

Hello,

Try running with the last 3 generations as input. If that does not fail, try the last 10.

The code most likely is improperly handling some variable - it may be a value used as a subscript that incorrectly points to an unitialized numeric field at the time of the 0c7.

How many records are in each file? To step thru multiple files with a high volume of records will be more frustrating than productive. . . ;)
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 92 times

Re: How to solve SOC7 abend ?

Postby sammouse » Thu Aug 13, 2009 10:22 am

Thanks everyone for ur replies... :)

as arunprasad said there is occurs clause after the bad-record which i found...in that a table over flow occurs because of some wrong condtional check..so that it is moving junk values..and this junk value is compared...thats why its giving SOC7....and its solved nw...

Once again thank u guys :)
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

Postby sammouse » Thu Aug 13, 2009 10:36 am

dick scherrer wrote:Hello,

The code most likely is improperly handling some variable - it may be a value used as a subscript that incorrectly points to an unitialized numeric field at the time of the 0c7.

. ;)


Thank u dick scherrer...u said exactly ...
sammouse
 
Posts: 9
Joined: Wed Aug 06, 2008 8:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to solve SOC7 abend ?

Postby dick scherrer » Fri Aug 14, 2009 1:36 am

You're welcome - good to hear it is working :)

Thanks for the followup letting us know,

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


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post