|
> David, > > Did you by any chance reverse the figures for cases 1 and 2? It makes no > sense that the file is larger for the allocated length case _unless_ a > substantial number of the fields had content that exceeded the allocated > length. Perhaps that was the case in your tests. > > As has been noted earlier, VARLEN will only save storage when a substantial > proportion of the records have content _within_ the allocated length. > > Jon Paris > Partner400 > www.Partner400.com No, the data I wrote was accurate. Each file has eight fields: VLFLD1 10A VLFLD2 20A VLFLD3 30A VLFLD4 40A VLFLD5 50A VLFLD6 60A VLFLD7 70A VLFLD8 80A The first file has VARLEN specified, but no allocation size. The second file has VARLEN(10) on each field. The same 10,000 records are in each file. The first 9900 records have the data 'FLD1', 'FLD2', 'FLD3', 'FLD4', etc. respectively. So realistically, I only fill four bytes of data in fields that range up to 80 bytes in size. The final 100 records are filled to their maximum size; that is, with data of '1111111111', '22222222222222222222', '333333333333333333333333333333', etc. respectively. I just now repeated the test, and got the same results that I posted previously. So, my interpretation of these results is that if you going to specify an allocation size on the VARLEN parameter, it should be as accurate as possible. In my case, I allocated 10 bytes, but then only used 4 for the majority of records. The size of the file with VARLEN(10) suffered as a result. I hope I explained that well enough. Thanks. David Bocian
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.