testing for corruption

Nancy Palmquist nlp at vss3.com
Mon Feb 4 06:53:41 PST 2008


Scott Nelson wrote:
> We had a file get corrupted while changing the map, even though all the 
> keys were restructured successfully.  The suspected culprit is a posting 
> report that is a cron job, but we are still looking into it.   To assist 
> in repairing the fields affected, I want to test each record and the 
> fields by detecting the garbage graphic characters that appear in the 
> fields.  I seem to remember that this can be done with ascii or chr 
> codes and a range to see if the values are not 0-9 or a-z. 
> 
> Thanks,
> 
> Scott
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 
Scott,

You really can not fix this by running anything directly on the file itself.  In 
my experience some of the corruption will cause records to be marked as free 
that should not be and records to be marked recorded that should be blank.  You 
can never select blank records in filePro reports.

But the method that would read the file as a non-filepro file, and analyze from 
there is best to insure that you look at everything.

This corruption can really be a bear to fix.  Good luck.  (Learn from the 
mistake and put in place some means to keep a safe copy or tar of the file, 
pre-restructure.  It takes time, but it will save you later.  Or some method to 
stop the cron job when it sees a certain file exists.  I have stuff like that 
running on a system that can be doing reports and stuff on files that I need to 
restructure on occasion.  I put in the processing logic to look to see if a file 
exists and if it does I have it in @once processing or scan/select processing 
just exit immediately.  This way I can easily put the file in place before I do 
maintenance, then remove it when I am done.  I don't have to worry about those 
functions interfering with my maintenance.)

Nancy

-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com


More information about the Filepro-list mailing list