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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sequence set<br />

The sequence set is the lowest level <strong>of</strong> index, and it directly points (through an RBA) to the<br />

data CI in the CA <strong>of</strong> the data component. Each index logical record:<br />

► Occupies one index CI.<br />

► Maps one CI in the data component.<br />

► Contains pointers and high key information for each data CI.<br />

► Contains horizontal pointers from one sequence set CI to the next keyed sequence set CI.<br />

These horizontal pointers are needed because <strong>of</strong> the possibility <strong>of</strong> splits, which make the<br />

physical sequence different from the logical collating sequence by key.<br />

Index set<br />

The records in all levels <strong>of</strong> the index above the sequence set are called the index set. An entry<br />

in an index set logical record consists <strong>of</strong> the highest possible key in an index record in the<br />

next lower level, and a pointer to the beginning <strong>of</strong> that index record. The highest level <strong>of</strong> the<br />

index always contains a single index CI.<br />

The structure <strong>of</strong> VSAM prime indexes is built to create a single index record at the lowest level<br />

<strong>of</strong> the index. If there is more than one sequence-set-level record, VSAM automatically builds<br />

another index level.<br />

Cluster<br />

A cluster is the combination <strong>of</strong> the data component (data set) and the index component (data<br />

set) for a KSDS. The cluster provides a way to treat index and data components as a single<br />

component with its own name. Use <strong>of</strong> the word cluster instead <strong>of</strong> data set is recommended.<br />

Alternate index (AIX)<br />

The alternate index is a VSAM function that allows logical records <strong>of</strong> a KSDS or ESDS to be<br />

accessed sequentially and directly by more than one key field. The cluster that has the data is<br />

called the base cluster, then an AIX cluster is built from the base cluster. Alternate indexes<br />

eliminate the need to store the same data in different sequences in multiple data sets for the<br />

purposes <strong>of</strong> various applications. Each alternate index is a KSDS cluster consisting <strong>of</strong> an<br />

index component and a data component.<br />

The records in the AIX index component contain the alternate key and the RBA pointing to the<br />

alternate index data component. The records in the AIX data component contain the alternate<br />

key value itself and all the primary keys corresponding to the alternate key value (pointers to<br />

data in the base cluster). The primary keys in the logical record are in ascending sequence<br />

within an alternate index value.<br />

Any field in the base cluster record can be used as an alternate key. It can also overlap the<br />

primary key (in a KSDS), or any other alternate key. The same base cluster may have several<br />

alternate indexes varying the alternate key. There may be more than one primary key value<br />

per the same alternate key value. For example, the primary key might be an employee<br />

number and the alternate key might be the department name; obviously, the same<br />

department name may have several employee numbers.<br />

AIX cluster is created with IDCAMS DEFINE ALTERNATEINDEX command, then it is populated by<br />

the BLDINDEX command. Before a base cluster can be accessed through an alternate index, a<br />

path must be defined. A path provides a way to gain access to the base data through a<br />

specific alternate index. To define a path, use the DEFINE PATH command. The utility to issue<br />

this command is discussed in 4.14, “Access method services (IDCAMS)” on page 129.<br />

Sphere<br />

A sphere is a VSAM cluster and its AIX associated clusters’ data sets.<br />

Chapter 4. Storage management s<strong>of</strong>tware 165

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

Saved successfully!

Ooh no, something went wrong!