|
Guys, your explications are perfectly clear and I thank you for them.
However what I was getting at was if I have ALLOCATE(0) for maximum space saving, how do I save space? Is not the data in the overflow plus that of the file not equal to or more than the disk space used without VARLEN? The overflow space must occupy something, somewhere. Or is it just some kind of black hole?
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Charles Wilt
Envoyé : mercredi 16 septembre 2009 15:19
À : RPG programming on the IBM i / System i
Objet : Re: Use of VARYING fields
On Wed, Sep 16, 2009 at 8:18 AM, Simon Coulter
<shc@xxxxxxxxxxxxxxxxx> wrote:
On 16/09/2009, at 7:13 PM, David FOXWELL wrote:don't care
After having read up, I have a couple of questions. If you
a fixed-about space saving, can't you just code the maximum and allocatedYes, but what would be the point? That would effectively be
length as the same?
length field with an additional 2-byte length prefix. Might make itSimon,
easier to determine actual length of the content but that's all.
The point would be, you'd benefit from not having to %trimr()
the fields yet don't pay a i/o hit when accessing any records.
I'd consider such a field as an alternative to a small (say
<50) fixed length field. Particularly in a table access by
native RPG op-codes.
Otherwise you're taking a dual i/O hit for some records even
if you don't need the variable length field. Of course, an
alternative would be to have a logical that didn't include
the varying field(s).
Charles Wilt
--
This is the RPG programming on the IBM i / System i
(RPG400-L) mailing list To post a message email:
RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.