File restructure bastardization
Jeff Harrison
jeffaharrison at yahoo.com
Wed Sep 28 08:46:54 PDT 2005
--- John Esak <john at valar.com> wrote:
[snip]
> Boy, I wish I had your "excepting the 2.5 hours per
> night"!!! We run truly
> 24/7/365 and we are constantly struggling with how
> and when to re-define
> maps. It is a very big problem. So far, one I have
> not come up with any good
> answer for yet. It would be great if all the
> brain-trusts here could come
> up with something do-able in this regard.
[snip]
What I have done in the past is pre-expand the files
that are likely to need additional fields. I know
this is not always practical, but its has helped me
tremendously at times.
I just make sure the last field in the map is called
"Extra" and I give it a length equal to the amount of
space that I want to reserve. Then, when this file is
active, I just need to make a backup of the map, then
edit the map with my favorite editor, making sure to
preserve the 2nd and 3rd columns in the map header. I
then insert the appropriate fields before my "Extra"
field in the map, I then decrement the length of my
Extra field so that the total lengths of all of the
fields together stay the same. I then go back to the
header and change the 4th column of the header to be
the new number of total fields in the key segment.
I then quickly go into clerk on the file and make sure
I did not mess anything up. If I have the data will
appear scrambled on the browse, and I just quickly
exit and copy the backup of the map back in place.
Another 1 time option is available too. If you don't
already have a data segment, then you can edit the map
similarly to above, except use the 3rd column to
specify the number of characters to use in the data
segment. This approach has the advantage that you
don't need to have pre-expanded the file.... No wait,
this won't work because you would still need people
out in order to run dexpand on the file to even up the
key and data lengths :( Well, FWIW you would at least
not need to re-structure.
Jeff Harrison
jeffaharrison at yahoo.com
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the Filepro-list
mailing list