change size of two fields without increasing size of file

Jeff Harrison jeffaharrison at yahoo.com
Wed Sep 9 14:10:17 PDT 2009


--- On Wed, 9/9/09, Kenneth Brody <kenbrody at spamcop.net> wrote:

> From: Kenneth Brody <kenbrody at spamcop.net>
> Subject: Re: change size of two fields without increasing size of file
> To: "Dennis Malen" <dmalen at malen.com>
> Cc: filepro-list at lists.celestial.com
> Date: Wednesday, September 9, 2009, 4:00 PM
> (Top-posting corrected.)
> 
> Dennis Malen wrote:
> > ----- Original Message ----- From: "Kenneth Brody"
> <kenbrody at spamcop.net>
> [...]
> > 
> >> Dennis Malen wrote:
> >>> Assume the following:
> >>>
> >>> Field 7 is 20 digits.
> >>> Field 86 is 6 digits.
> >>>
> >>> I want to add 5 digits to field 7 and reduce
> field 86 to 1 digit.
> >>>
> >>> Can I go in and change the size and let it
> rip? Will all the other 
> >>> fields remain intact?
> >>
> >> If by "go in" and "let it rip", you mean "use
> ddefine to make the 
> >> change and let it restructure the file", then of
> course the other 
> >> fields will remain intact.  Why would this
> scenario be different than 
> >> any other?
> >>
> >> If you meant something else, then you'll need to
> explain further.
> >>
>  > So the size of the file will remain the same and the
> all the other
>  > fields will remain intact as there are over 300,000
> records in this file?
>  >
>  > Yes, we do intend to use ddefine.
> 
> I guess you've never changed a file definition
> before?  That's what ddefine 
> does when you change the file definition in a file with
> records in it -- it 
> restructures it to match the new definition.  If you
> only change 2 out of 
> the 86+ fields, then only those 2 fields will be
> changed.  The other 84+ 
> fields will be left alone, as you didn't change their
> definition.
> 
> And, because the resulting record length is the same as the
> original record 
> length, the file will remain the same size.
> 
> Again, why would you expect otherwise?
> 
> -- 
> Kenneth Brody

Right, however, if he had previously re-structured the map using ddefine and the resulting change was less characters than the original, I believe that ddefine would have asked if it should shrink the file.  If he answered "No" at that time, I believe that it would ask again each time he edits the map if the resulting edit was less than the preallocated space.

Jeff Harrison


      


More information about the Filepro-list mailing list