Page 1 of 1

How do we find bad data in a file?

Posted: Wed Feb 14, 2024 12:16 pm
by Bobbie V
Hi,

How do we find bad data in a file?

Re: How do we find bad data in a file?

Posted: Wed Feb 14, 2024 12:49 pm
by Akshya Chopra
Use command f all x'05' you can find bad data.

Re: How do we find bad data in a file?

Posted: Wed Feb 14, 2024 1:21 pm
by enrico-sorichetti
How do we find bad data in a file?
define what you consider bad data

without that any answer will rank from useless to wrong

note ...
x'05' is a perfectly good char for binary and packed numerics




 

Re: How do we find bad data in a file?

Posted: Thu Feb 15, 2024 2:12 am
by Robert Sample
It depends upon what you mean by "bad data" -- since what you consider bad may be perfectly valid.  For example, consider the hex characters X'0097995D'.  If they are treated as packed decimal, the value is -97995.  If they are treated as binary, the value is 9,935,197.  If they are treated as EBCDIC characters, they are "<nul>pr)" 

So which interpretation is "correct" and which are "bad data"?  That totally depends upon how you look at the value.  All three interpretations are of the same data and may represent something good.

Re: How do we find bad data in a file?

Posted: Thu Feb 15, 2024 12:50 pm
by Bobbie V
Akshya Chopra" wrote: Wed Feb 14, 2024 12:49 pm Use command f all x'05' you can find bad data.
This is working, but will this find all the bad data?

Re: How do we find bad data in a file?

Posted: Thu Feb 15, 2024 2:02 pm
by enrico-sorichetti
again ...

DEFINE WHAT YOU CONSIDER BAD DATA