IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Identifying the record which caused S0C7 abend


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sampathkmn
Warnings : 1

New User


Joined: 12 Dec 2005
Posts: 31
Location: bangalore

PostPosted: Thu Mar 11, 2010 9:39 am
Reply with quote

If a production job abends with S0C7, how to point out a particular record which caused abend(assuming input has millions of records).
I have knowledge on LIST compiler option which will point out the offset for the field which could have caused the abend. But, this won't help in pointing out exact record which might have caused it.

Is there any way apart from sing Expeditor or other debug tools?
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Mar 11, 2010 10:01 am
Reply with quote

......It can be identified by counting the number of records read and displaying the record count before the program ends.

Also, a display statement would help.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 11, 2010 10:09 am
Reply with quote

Hello,

Quote:
But, this won't help in pointing out exact record which might have caused it.
Yes, it will. You use the offset to identify the problem data in the dump. Is Abend-Aid installed on the system?

Quote:
......It can be identified by counting the number of records read and displaying the record count before the program ends.
Probably not. . . The count could not be displayed after the program abended and it makes no sense to display millions of "counts" from the beginning of the process up til the abend.

If a counter is used, it can be seen in the dump.
Back to top
View user's profile Send private message
sampathkmn
Warnings : 1

New User


Joined: 12 Dec 2005
Posts: 31
Location: bangalore

PostPosted: Thu Mar 11, 2010 10:34 am
Reply with quote

I believe offset will display only the field which is having junk/invalid data. But, how it will display the fauly data. Is there any compile parm for this?

Mathiv, I agree displaying count. but during production job monitoring SLA will not give us enough time to edit code and recompile, we can not waste time here.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 11, 2010 11:01 am
Reply with quote

Quote:
SLA will not give us enough time to edit code and recompile, we can not waste time here.


there is a hole in the process, it would be wiser to be proactive and find out where the invalid data came from and fix it
and until You do not do it You will keep wasting time

look like the classic case of ...
we do not have the time to do it right, but we have the time to do it over and over
Back to top
View user's profile Send private message
sampathkmn
Warnings : 1

New User


Joined: 12 Dec 2005
Posts: 31
Location: bangalore

PostPosted: Thu Mar 11, 2010 11:13 am
Reply with quote

I am asking the way to findout S0C7 abend caused record from input. It might be one of the millions of input records.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Mar 11, 2010 11:22 am
Reply with quote

Quote:
I am asking the way to findout S0C7 abend caused record from input. It might be one of the millions of input records.

If it is bad data in the input dataset which is causing problem, you can identify such data using DFSORT VERIFY for numeric PD\ZD
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Mar 11, 2010 11:32 am
Reply with quote

And if you have File-AID or similar tools and open the input data set with copybook in File-AID, you can easily see (might be shown as INVALID) the record's field which is not obeying the field denifition of copybook.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 11, 2010 11:44 am
Reply with quote

Hello,

Quote:
I am asking the way to findout S0C7 abend caused record from input.
The way to do this (with no changes to the existing code) is to locate the problem value in the dump.

Once you identify which field in which record caused the 0c7, you can then proceed to fix the invalid data using whatever means you choose. Until you identify what is wrong (and decide what is the proper data fix), there is not much else to do. The "best" solution would be to fix the process that creates this file with invalid data and re-run this to create a valid file.

Quote:
And if you have File-AID or similar tools and open the input data set with copybook in File-AID, you can easily see (might be shown as INVALID) the record's field which is not obeying the field denifition of copybook.
Might be a problem going thru multiple million records . . . icon_smile.gif
Back to top
View user's profile Send private message
sampathkmn
Warnings : 1

New User


Joined: 12 Dec 2005
Posts: 31
Location: bangalore

PostPosted: Thu Mar 11, 2010 12:02 pm
Reply with quote

I saw this answer in other forum "If the cobol program is compile with option FDUMP. you can see the input record which caused the abend CEEDUMP and also the field which cause the error."

Can anyone tell if this worked?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Mar 11, 2010 2:06 pm
Reply with quote

Hi,

I'm no COBOL programmer, but is it also possible that a flawed process in the code can also cause the S0C7 abend such as moving fields around after tha data is read ?


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 11, 2010 3:32 pm
Reply with quote

xpediter will take time to reach the record, do you have abend-aid installed?
Back to top
View user's profile Send private message
Karthikeyan Subbarayan

New User


Joined: 24 Feb 2008
Posts: 62
Location: Boston

PostPosted: Thu Mar 11, 2010 4:37 pm
Reply with quote

Do you have abend aid in your shop .
If yes, It shows the current record in error and the previous record.. From there you skip all the millions of records until the current record using a simple SORT and you arrive at the abend record.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 11, 2010 6:11 pm
Reply with quote

If you got a dump (from Abend Aid or via //SYSUDUMP), you can find the current record that was being processed in the dump. If you didn't get a dump, you need to rerun and get a dump since you must have one to properly analyze the problem. As has been mentioned, however, it is not necessarily the data in the current record which caused your problem -- while a S0C7 always means invalid numeric data was processed, the source of that invalid data could be the file, your program, a subprogram, or all sorts of possibilities.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts ISAM and abend S03B JCL & VSAM 10
Search our Forums:

Back to Top