Variable‑length records in VSAM KSDS

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Aditi Patwal
Registered Member
Posts: 12
Joined: Wed Aug 20, 2014 8:20 am

Variable‑length records in VSAM KSDS

Post 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.
User avatar
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 855
Joined: Wed Sep 11, 2013 3:57 pm

Re: Variable‑length records in VSAM KSDS

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1905
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa

Re: Variable‑length records in VSAM KSDS

Post 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.
Aditi Patwal
Registered Member
Posts: 12
Joined: Wed Aug 20, 2014 8:20 am

Re: Variable‑length records in VSAM KSDS

Post 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!
Post Reply Previous topicNext topic

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”