11.01.2013 Views

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.34 VSAM key sequenced cluster (KSDS)<br />

Data component<br />

Figure 4-44 Key sequenced cluster (KSDS)<br />

VSAM KSDS cluster<br />

In a KSDS, logical records are placed in the data set in ascending collating sequence by key.<br />

The key contains a unique value, which determines the record's collating position in the<br />

cluster. The key must be in the same position (<strong>of</strong>f set) in each record.<br />

The key field must be contiguous and each key’s contents must be unique. After it is<br />

specified, the value <strong>of</strong> the key cannot be altered, but the entire record may be deleted.<br />

When a new record is added to the data set, it is inserted in its logical collating sequence by<br />

key.<br />

A KSDS has a data component and an index component. The index component keeps track<br />

<strong>of</strong> the used keys and is used by VSAM to retrieve a record from the data component quickly<br />

when a request is made for a record with a certain key.<br />

A KSDS can have fixed or variable length records.<br />

A KSDS can be accessed in sequential mode, direct mode, or skip sequential mode (meaning<br />

that you process sequentially, but directly skip portions <strong>of</strong> the data set).<br />

166 <strong>ABCs</strong> <strong>of</strong> z/<strong>OS</strong> <strong>System</strong> <strong>Programming</strong> <strong>Volume</strong> 3<br />

VSAM.KSDS<br />

VSAM.KSDS.DATA<br />

VSAM.KSDS.INDEX<br />

Cluster component<br />

Index component

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!