View previous topic :: View next topic
|
Author |
Message |
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
How do you find an error in a large file without using a debugger tool? This is an interview question that was posed to me. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
What is meant here by "error"? |
|
Back to top |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
Bad data. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
OK, if the data cause the program to abend, it can be found in the dump. Otherwise, you will have to deduce from the erroneous output what the bad data are, and search the data set with some utility. The program should then edits and/or sanity checks added to it so that this situation does not recur. |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
I think this is a vague question.
1. What is a large file? 10000 records or over a million records ?
2. How do you find the error in 'a large file' using debugger ? Do you already know the record in question ?
a. If you don't know the record then do you really plan to go through each record one by one until you find error in 'a large file'?
b. And if you already know the error then why don't you use File mapping utilities like File Aid/ File Manager and see the field having bad data.
3. You can also use displays (depends on how large is the file and If you know the field to display)
. |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
And Why put it in a JCL & VSAM section of the forum ? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Have you looked at ICETOOL VERIFY? |
|
Back to top |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
Thanks Rohit. This will help me identify decimal values.
Do you know of any other ways which will tell me of bad data? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
"Bad data" can mean anything. Data which must appear on a keyed file/db table can look quite normal, but be "bad" because it does not match.
To find bad data, you have to know what you're looking for. |
|
Back to top |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
You are exactly right Bill. That was the sole reason of me asking for different methods. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Quote: |
Do you know of any other ways which will tell me of bad data? |
Suraaj, If any interviewer asks you such questions next time what you should answer is,
a. What do you mean by bad data?
b. Bad data is for numerics, so I told you the way.
c. No one wants to spend time looking just for a bad data in a file unless some jobs abends hence you should ask them about specifics about the abend and the dump.
d.So S0C7 is abend you should see for bad data.
So if you tell this to them then I don't think they will have anymore questions for you on this. They sometimes wants to run some fool tests and we shouldn't get trapped by looking at "Other Methods" which doesn't exist.
Quote: |
That was the sole reason of me asking for different methods. |
There is no other method than adding display's or look for an offset and investigate. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Do you know of any other ways which will tell me of bad data? |
I think your basic problem is that "bad data" is ALWAYS context-related. Packed decimal data can cause S0C7 abends but may or may not cause abends. |
|
Back to top |
|
|
suraaj
New User
Joined: 16 Apr 2009 Posts: 69 Location: Canada
|
|
|
|
Thanks Rohit and all others for all your help. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
CEEMSG output helps as well in identifying the record in case of S0C7 |
|
Back to top |
|
|
|