Skip to content
Datasets & storage

KSDS

The most common VSAM dataset type, where every record has a unique key used to find it directly.

Also written key-sequenced dataset

KSDS stands for key-sequenced dataset. It is the VSAM type applications use most, because it matches how business data is actually accessed: by identifier.

Every record contains a key field in a fixed position, such as an account number, a customer reference or a policy number, and every key must be unique. VSAM maintains an index over those keys, so a program can ask for one record by key and get it without scanning anything.

Records are also held in key order, which means the dataset can still be read sequentially when needed, and a program can position itself at a key and read forward from there. That combination, direct access plus ordered sequential access, is what makes it so widely used.

Alternate indexes can be defined over other fields, allowing lookups by a secondary value such as a surname.

A COBOL program treats a KSDS as an indexed file, reading, writing, rewriting and deleting records by key. Defining and loading one is done with IDCAMS before the program ever runs.

Browse all 115 terms

Learn this properly.

Use KSDS for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.