Based on what has been said on the forum before,

1. Whenever you display anything from the database, the database will
always present it as if there was one field. The sticking together occurs
at the lowest level of the DB.
2. According to what I know, it does not matter. IBM always go to the
overflow and reads it in no matter what so I am not sure the VARLEN does
you any good. I guess the only thing it would do for you is reduce the
amount of disk storage required.

On Tue, Jul 29, 2014 at 10:09 AM, John R. Smith, Jr. <smith5646@xxxxxxxxx>

I have some questions about variable length fields in files created using

When I learned about them, I was told that if there is a field with a max
100 bytes with a VARLEN(20), the system allocates 20 bytes in the record
if the value is longer than 20 bytes, it stores the additionally needed
bytes elsewhere. When the record is read, the OS knows to retrieve the 20
bytes from the record and concatenates the additional bytes from the
elsewhere storage (if any exist) and it returns a 100 byte field. The net
result is less DASD tied up with extraneous spaces in the file with no
impact to the developer. However, when I look at the file via DSPPFM or
WRKLNK, I see all 100 bytes even if all 100 are spaces.

My questions are:
1) Is the OS smart enough to pad out the 21-100 bytes when displayed via
WRKLNK and DSPPFM so I don't see the difference or is my understanding of
how the DDS VARLEN works flawed?
2) Assuming my VARLEN is guessed correctly and most records fit into the
allocated bytes, is there any noticeable impact with using VARLEN fields?
3) If my guess is incorrect and a big chunk of records require the
additional 21-100 bytes, does this have a huge performance impact?


This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page