×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Albert
This sounds like it thinks the fields are the full length, even though
you have shorter values. Take a look with DSPPFM, then press F10 and
F11. You'll get and over/under hex display. See what the first 2 bytes
are for the varlen field. That gives the length it thinks you have.
VARLEN fields can be tricky - if you fill them from fixed-length
variables, it takes the full length of the variable, so it includes
trailing blanks. In ILE RPG you need to use at least a %trimr() function.
You might try an update - make a test table with CPYF by selecting maybe
the first 25 records. See what the file size is. Then do an SQL UPDATE
along the lines of
update table set varfield = strip(varfield)
Then see what the size is. You might need to do a RGZPFM to recover the
space used for the full-length values, I thought that at one time the
auxiliary space was not recovered until a reorganize.
Or do a DSPFFD and see what the allocated length is - be sure it's not
the full length of the field. For best compromise of performance and
disk utilization, it should be a length that takes in about 80-90% of
the records.
Maybe!!!
Vern
On 9/14/2010 6:03 PM, Albert York wrote:
I have a very long field (32000 bytes) that I defined in a file using
varlen. Most of the time the field will be around 1 K but sometimes it
could be 32000 bytes.
When I look at the file size it shows 1.357 GB for 44180 records. When
I look at the records the field size for that field looks correct.
Why is the file so large?
Thanks,
Albert
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.