VSAM
A family of dataset types built for fast record access by key, used where applications need to look records up rather than read them in order.
Also written Virtual Storage Access Method
VSAM, or Virtual Storage Access Method, is how mainframe applications store data they need to retrieve directly rather than sequentially. Where a sequential dataset means reading from the start, a VSAM dataset can find one record among millions immediately.
It comes in several forms. The one you meet most is KSDS, keyed by a field inside each record, such as an account number. ESDS stores records in the order they arrive and retrieves them by position. RRDS numbers slots and retrieves by number. Linear datasets hold raw pages and are mostly used by system software.
VSAM datasets are not created or copied like ordinary files. They are defined, listed, loaded and deleted with a utility called IDCAMS, and that is where most of the learning curve sits.
It is old technology and still everywhere, because for a program that needs to read and update one customer record at a time, it is fast, reliable and well understood. Plenty of core banking data sits in VSAM rather than a relational database.
Related terms
- KSDSThe most common VSAM dataset type, where every record has a unique key used to find it directly.
- IDCAMSThe utility used to create, list, copy and delete datasets, and the standard tool for anything involving VSAM.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- DB2 for z/OSIBM's relational database on the mainframe, where a great deal of the world's banking and insurance data is stored.
- Sequential datasetThe simplest kind of dataset: records stored one after another and normally read from start to finish.