Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Identifying the record which caused S0C7 abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Identifying the record which caused S0C7 abend
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    Post subject: Reply to: Identifying the record which caused S0C7 abend
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

Site Director


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

PostPosted: Thu Mar 11, 2010 10:09 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Mar 11, 2010 11:01 am    Post subject: Reply to: Identifying the record which caused S0C7 abend
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    Post subject:
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    Post subject:
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: 785
Location: Chennai, India

PostPosted: Thu Mar 11, 2010 11:32 am    Post subject:
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

Site Director


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

PostPosted: Thu Mar 11, 2010 11:44 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Mar 11, 2010 2:06 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Mar 11, 2010 3:32 pm    Post subject:
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: 56
Location: Boston

PostPosted: Thu Mar 11, 2010 4:37 pm    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Thu Mar 11, 2010 6:11 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Identifying the emulator used vasanthz All Other Mainframe Topics 8 Thu Sep 29, 2016 2:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us