|
I did some tests few weeks ago since I need to log programs call (the parameters part). Since the parameter area can range from 10 to 32000 but the average is 200 bytes I coded a PF with 54 bytes of various fileds and a field 32000 varlen. The tests added 1000 records with the varying filed set to 200, 10000 and 32000. The "cost" for the 200 was 328 (average) bytes per record, the 10000 was 10215 and the 32000 was 33394. HTH Marco --- d.bocian@xxxxxxxxxxx wrote: > > 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 __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
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.