|
View previous topic :: View next topic
|
| Author |
Message |
suresh111
New User
Joined: 14 Feb 2005 Posts: 17
|
|
|
|
Hi All,
I have a quick question.
I have large data in a file and I would like to find all bad records (caused by S0C7) how can i find them? please let me know what are the different ways available to do that.
Thanks,
Suresh |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
S0C7 is caused by invalid data in numeric fields that is being used for arithmetic. These fields could be DISPLAY or PACKED-DECIMAL -- no way of knowing for sure. You have a couple of options:
1. write a validation program that checks every numeric field to contain numeric values, or
2. update your application program to verify every numeric field contains a valid value before using it. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
| Back to top |
|
 |
suresh111
New User
Joined: 14 Feb 2005 Posts: 17
|
|
|
|
| Thanks for the solution. |
|
| Back to top |
|
 |
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
Hi All,
Suppose a COBOL program is using an input file containing 100000 records.
The program is reading a data from the file and after some validation it is updating another VSAM file.
Some time because of bad data (incorrect format), in input file, program abends.
Is there a way to identify the last record (from input file) processed or the record which cause abend?
We don’t want to code display verb in the COBOL program.
Is there any way of finding this by looking into system dump? If there is way, could any body please describe step by step process to find the last record process or the record which abended?
Thanks
Ravi |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Assuming it is a system dump, find the file section and look at the buffer for the particular file of interest. Since every dump is somewhat different, there's no canned procedure to follow -- you have to actually learn how to read the hexadecimal data, understand what the dump is telling you, and go from there. |
|
| Back to top |
|
 |
vikramsreddy
New User
Joined: 03 Sep 2006 Posts: 7 Location: Chicago, USA
|
|
|
|
Looks like this was posted super long back. Here is another solution which can be used with INSYNC/FILE-AID:
Assuming that you have the copybook and know the field name which has invalid data, You could use the selection criteria with
Field-Name NV 0
where NV stands for not-valid on File-aid or Insync.
This will help you find all records with invalid data.
Hope this helps!! |
|
| Back to top |
|
 |
|
|