I have a file that has 20 pairs of fields, a Header (30 chars) and Text (256 chars), and I am trying to determine the best use of VARLEN to reduce the size of the file.
Although there are 20 pairs of fields in each record, most are empty, and in 90% of cases there is only 1 pair that has a value, the rest will be blank.
What would you recommend for the VARLEN value?
Below is an extract of the DDS:
I didn't create this, if I did I would have used multiple records with 1 pair per record. I am just trying to improve the file storage requirements.
The file is populated by CPYFRMIMPF and does have trailing blanks stripped.
Thanks for your advice on this.
Although there are 20 pairs of fields in each record, most are empty, and in 90% of cases there is only 1 pair that has a value, the rest will be blank.
What would you recommend for the VARLEN value?
Below is an extract of the DDS:
Code:
A R RPRDFLDS A DIMITM 5S 0 COLHDG('Item' 'No') A DIMH01 30 COLHDG('Header' '01') A DIMT01 256 COLHDG('Text' '01') A VARLEN A DIMH02 30 COLHDG('Header' '02') A DIMT02 256 COLHDG('Text' '02') A VARLEN
The file is populated by CPYFRMIMPF and does have trailing blanks stripped.
Thanks for your advice on this.
Comment