Virtual Storage Access Method (VSAM). The word virtual means only that VSAM was introduced at approximately the same time as the initial IBM virtual storage operating systems OS/VS1 and OS/VS2.
VSAM supports five data set organizations:
- Key-sequenced data set (KSDS)
- Entry-sequenced data set (ESDS)
- Fixed-length relative record data set (RRDS)
- Variable-length relative record data set (VRRDS)
- Linear data set (LDS)
The primary difference between the VSAM data set organizations is the way in which their records are stored and accessed.
One physical record, smallest unit of information to transfer between storage device and processor. Can be one or more DASD blocks. All CI’s within one dataset must be the same length.
LR1 | LR2 | LRn | free space | RDF1 | RDFn | CIDF
LR - logical record, what is defined in programs copybook.
RDF - describes records in CI 1 to many depending on LR charteristics.
CIDF - CI definition.
Two or more CIs in fixed length contiguous areas of DASD. A VSAM data set is composed of one or more CAs. If both the primary and secondary allocations are equal to or larger than one cylinder, the CA size is one cylinder. The minumum size of a CA is one track.
Splits occur as the result of data record insertions. No free space in CI, half LR’s are moved to a free CI. No free CI’s and a CA split occurs.
Records larger than CI size.
A VSAM data set can be expanded to 123 extents per volume or to a maximum size of 4G (maximum RBA limit (4,294,967,295)) if NOT defined as extended format and extended addressability in the storage class. The last four extents are reserved for extending a data set when the last extent cannot be allocated in one piece. (VSAM attempts to extend a data set when the total number of extents is less than 255.) The 4Gig limit applies to space allocated, so if you have 2.5 giga of actual data, but you allocated over 4 gig of space you will have a problem.
Extended addressability (EA) was introduced in DFSMS/MVS 1.3, for KSDSdata sets. Since DFSMS/MVS 1.4, EA is supported in record level sharing(RLS). With DFSMS/MVS 1.5, support for extended addressability is extended to all other VSAM record organizations. With EA, the 4G architectural limit for data set size imposed by using the 4-byte field for the relative byte address (RBA) was eliminated.
Using EA, the size limit for a VSAM data set is determined by either:• CI size multiplied by 4 GB• The volume size multiplied by 59 A 4 K CI size yields a maximum data set size of 16 TB, while a 32 KB CI size yields a maximum data set size of 128 TB. A 4K CI size is preferred by many applications for performance reasons. No increase in processing time is expected for extended format data sets that grow beyond 4 GB.To use EA, the data set must be:
- SMS-managed
- Defined as extended format
EOV function is invoked by VSAM Record Management, when a VSAM data set requires additional space. The lack of this additional space is perceived by:
High-used RBA (HURBA) = High-allocated RBA (HARBA)
RBA of next CI/CA greater than HARBA during create
No extent in the current volume contains a specific searched RBA
Then, EOV acquires new extents interfacing with DADSM, updates the VSAM control block structure for the data set with the new extent information, and updates the critical control block data in common storage and in the catalog, so that this new space is accessible by all regions using this VSAM data set