Page 1 of 1

Corrupted Flat file

PostPosted: Tue Oct 11, 2011 2:24 pm
by diptisaini
Hi,

I just need to know how we can check whether the file is corrupted or not(Flat file)?

Second thing under which scenario our file be corrupted.

Re: Corrupted Flat file

PostPosted: Tue Oct 11, 2011 2:47 pm
by enrico-sorichetti
if You want good answers, learn to ask good questions
define corrupted

Re: Corrupted Flat file

PostPosted: Tue Oct 11, 2011 11:38 pm
by Frank Yaeger
We have no idea what YOU mean by "corrupted". You need to explain what you're trying to do. What would indicate that the file is corrupted?
Do you mean unreadable? If so, how was the file created and what product do you use to read it? Provide more details.

Re: Corrupted Flat file

PostPosted: Tue Oct 11, 2011 11:53 pm
by steve-myers
As enrico-sorichetti says, you must define "corrupted."

In z/OS type systems, there are two ways a "flat" dataset on disk can be corrupted.
  • An unauthorized user altered the dataset due to inappropriate access permissions. Your best bet fir this problem is to analyze SMF data.
  • There is a problem with the dataset extent maps. This is very rare, and I do not know a good tool in the public domain to detect this problem. More often you see space that is not assigned to a dataset or to free space. Your storage management group should analyze and correct this problem.

Re: Corrupted Flat file

PostPosted: Wed Oct 12, 2011 12:07 am
by steve-myers
Oh yes, there is a third way. Am authorized user (which usually mean you) wrote invalid data to the dataset.

Re: Corrupted Flat file

PostPosted: Wed Oct 12, 2011 3:34 am
by BillyBoyo
enrico's found another possibility elsewhere. A file edited with ISPF and saved with PACK ON would probably count as corrupt if treated outside ISPF as a flat file in an application program.

For an ordinary flat file, I don't think there is a utility to check its internal integrity. The format is so simple, I guess, if you can read it it is not corrupt, if you can't it is. Never had a corrupt PS myself, or even heard of one.

Any proprietary format file might appear "corrupt" if it has its own internal structure and you try to read it.

Re: Corrupted Flat file

PostPosted: Wed Oct 12, 2011 5:25 am
by steve-myers
Billyboyo is correct: a dataset saved with the ISPF PACK option would certainly appear to be "corrupt" to any other program. About 10 years ago I reverse engineered the ISPF pack option; it's just a variation on the RLE compression method.