09.07.2015 Views

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

z/OS V1R6.0 DFSMS Access Method Services for Catalogs

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.

DEFINE ALTERNATEINDEXv KILOBYTES allocates the minimum number of tracks required to contain 1600kilobytes <strong>for</strong> the alternate index’s space. When the alternate index is extended, itis to be extended by the minimum number of tracks required to contain 200kilobytes.vvNONUNIQUEKEY means the alternate key value might be the same <strong>for</strong> two ormore data records in the base cluster.UPGRADE opens the alternate index by VSAM and upgrades it each time thebase cluster is opened <strong>for</strong> processing.Define an Alternate Index: Example 3In this example, an alternate index is defined. An example <strong>for</strong> DEFINE CLUSTERillustrates the definition of the alternate index base cluster, EXAMPLE.KSDS2. Asubsequent example illustrates the definition of a path, EXAMPLE.PATH, that letsyou process the base cluster’s data records using the alternate key to locate them.The alternate index, path, and base cluster are defined in the same catalog,USERCAT.//DEFAIX1 JOB ...//STEP1 EXEC PGM=IDCAMS//SYSPRINT DD SYSOUT=A//SYSIN DD *DEFINE ALTERNATEINDEX -(NAME(EXAMPLE.AIX) -RELATE(EXAMPLE.KSDS2) -KEYS(3 0) -RECORDSIZE(40 50) -VOLUMES(VSER01) -CYLINDERS(3 1) -NONUNIQUEKEY -UPGRADE) -CATALOG(USERCAT)/*The DEFINE ALTERNATEINDEX command creates an alternate index entry, a dataentry, and an index entry to define the alternate index EXAMPLE.AIX. TheDEFINE ALTERNATEINDEX command also obtains space <strong>for</strong> the alternate indexfrom one of the VSAM data spaces on volume VSER01, and allocates threecylinders <strong>for</strong> the alternate index’s use. The parameters are:vvvvvvvvvNAME indicates that the alternate index’s name is EXAMPLE.AIX.RELATE identifies the alternate index base cluster, EXAMPLE.KSDS2.KEYS identifies the length and location of the alternate key field in each of thebase cluster’s data records. The alternate key field is the first three bytes of eachdata record.RECORDSIZE specifies that the alternate index’s records are variable length,with an average size of 40 bytes and a maximum size of 50 bytes.VOLUMES indicates that the alternate index is to reside on volume VSER01.This example assumes that the volume is already cataloged in the user catalog,USERCAT.CYLINDERS allocates three cylinders <strong>for</strong> the alternate index’s space. Thealternate index is extended in increments of one cylinder.NONUNIQUEKEY specifies that the alternate key value might be the same <strong>for</strong>two or more data records in the base cluster.UPGRADE specifies that the alternate index is opened by VSAM and upgradedeach time the base cluster is opened <strong>for</strong> processing.CATALOG defines the alternate index in the user catalog, USERCAT.Chapter 13. DEFINE ALTERNATEINDEX 143

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

Saved successfully!

Ooh no, something went wrong!