Page 1 of 1

Variable‑length records in VSAM KSDS

Posted: Mon Oct 06, 2025 6:46 pm
by Aditi Patwal
Hi,

I’m working on a setup with variable-length payloads and need to fine-tune CI/CA sizes, freespace, and reorg cadence to maintain steady performance. Would love to hear what’s worked for others.

Re: Variable‑length records in VSAM KSDS

Posted: Mon Oct 06, 2025 10:06 pm
by enrico-sorichetti
see  https://zmainframes.com/viewtopic.php?f=12&t=12502
the same criteria for CI/CA sizes holds for variable length records

Re: Variable‑length records in VSAM KSDS

Posted: Tue Oct 07, 2025 3:31 am
by Robert Sample
Understanding your data is absolutely critical.  Your requirements would be completely different for a data set with record lengths varying from 100 to 200 bytes as opposed to one with a base record length of 900 bytes and a maximum record length of 32767 bytes.  You also want to understand how variable is the data -- are 99% of the records of a fixed length with only a few having different lengths?  Or are there a wide range of record lengths?  Depending on the data, you may want to not use FREESPACE and let CA splits occur as needed.

Re: Variable‑length records in VSAM KSDS

Posted: Wed Jan 21, 2026 1:20 pm
by Aditi Patwal
Hi All,
Thanks a lot, Enrico and Robert, for your inputs.
I did some more analysis based on your suggestions, and here is what I found about our data:

Record sizes are roughly between 150 bytes to around 5 KB.
About 70% of the records stay within a smaller range, but the remaining 30% vary quite a bit.
Inserts usually come in bursts, and sometimes updates increase the record length as well.

Considering this pattern, I had a few more questions:

In this kind of mixed record-size scenario, is it better to avoid FREESPACE completely, or should I still keep something like 5–10% to reduce CA splits?
Any thumb rules for choosing CI/CA size when the record-length variation is moderate but not extreme?
Do you generally schedule REORG on a regular basis, or do it only when split counts start going up?

If anyone has handled similar workloads, would appreciate your suggestions on what worked well.
Thanks again for your guidance!