change size of two fields without increasing size of file

Kenneth Brody kenbrody at spamcop.net
Wed Sep 9 13:00:10 PDT 2009


(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


More information about the Filepro-list mailing list