testing for corruption

Bob Stockler bob at trebor.iglou.com
Mon Feb 4 13:47:35 PST 2008


Jeff Harrison wrote (on Mon, Feb 04, 2008 at 11:01:16AM -0800):
[snip]

| I wonder if there would be any demand for a filepro
| corruption detector (written in filepro of course). 
| This routine would just prompt the user for the name
| of the filepro file to check (or it could be passed on
| the command line) and it could output the record
| numbers where corruption appears, and perhaps a
| description as to what kind of corruption it is.
| 
| It would internally use the alien file technique to
| analyze the data.  I don't think this would be too
| difficult to develop at all.  Any thoughts from this
| list?  Would this be a useful tool to have in the
| toolbox?

My "deflate" program (a filePro file) automates writing an Alien
filePro file to overlay the "key" file in any filePro file in the
"filepro" directory in which it's installed.

As written, it first field is length 20, followed by a number of
fields of length 999 or less to equal the logical record length.
It creates a screen 0, with only the first field on it, unless the
filePro record length is short enough that a second field would fit
on the screen.

It could easily be edited to make its "map" file have its fields 2
through Num_Fields have the field lengths of the target file.

However, if I execute:

  /u/appl/fp/dscreen -s0

and step through the target file in record number order, after the
first record (filePro's own record), I see:

  fP_Header: rr?rrr@?rrrrrrrr<

  Record #:                      1 - Active (Used)

or:

  fP_Header: rr?rrr@?rrrr    <

  Record #:                     11 - Active (Unused)

NOTE: The charcters shown in the fP_Header fields above are ASCII
      substitutes for what I really see.

There is no processing table named "input" in my "deflate" file, but
there is one named "automatic", and its content is:

         If: @rn eq "1"
    1  Then: end
         If: 1 eq chr("0")
    2  Then: show("10","5") "Record #: " & @rn - "1" < "- Inactive (Unused) " ;
              end
         If: 1 eq chr("1")
    3  Then: show("10","5") "Record #: " & @rn - "1" < "- Active (Used)     " ;
              end
    4  Then: show("10","5") "Record #: " & @rn - "1" < "- In Limbo          "

Maybe I've already written what you're suggesting.

Bob

-- 
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor


More information about the Filepro-list mailing list