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.

6.5 Using aliases<br />

// DD DSN=PAY.D1<br />

// DD DSN=PAY.D2<br />

// DD DSN=DEPT1.VAC<br />

// DD DSN=DEPT2.VAC<br />

MCAT<br />

ALIAS: PAY<br />

UCAT1<br />

ALIAS: DEPT1<br />

ALIAS: DEPT2<br />

UCAT2<br />

SYS1.LINKLIB<br />

SYS1.PARMLIB<br />

...<br />

Figure 6-6 Using aliases<br />

UCAT1<br />

PAY.D1<br />

PAY.D2<br />

...<br />

UCAT2<br />

DEPT1.VAC<br />

DEPT2.VAC<br />

...<br />

PAY.D1<br />

...<br />

PAY.D2<br />

...<br />

DEPT1.VAC<br />

DEPT2.VAC<br />

...<br />

Using aliases<br />

Aliases are used to tell catalog management which user catalog your data set is cataloged in.<br />

First, you place a pointer to an user catalog in the master catalog through the IDCAMS DEFINE<br />

UCAT command. Next, you define an appropriate alias name for a user catalog in the master<br />

catalog. Then, match the high-level qualifier (HLQ) <strong>of</strong> your data set with the alias. This<br />

identifies the appropriate user catalog to be used to satisfy the request.<br />

In Figure 6-6, all data sets with an HLQ <strong>of</strong> PAY have their information in the user catalog<br />

UCAT1 because in the master catalog there is an alias PAY pointing to UCAT1.<br />

The data sets with an HLQ <strong>of</strong> DEPT1 and DEPT2, respectively, have their information in the<br />

user catalog UCAT2 because in the master catalog there are aliases DEPT1 and DEPT2<br />

pointing to UCAT2.<br />

Note: Aliases can also be used with non-VSAM data sets in order to create alternate<br />

names to the same data set. Those aliases are not related to a user catalog.<br />

To define an alias, use the IDCAMS command DEFINE ALIAS. An example is shown in 6.7,<br />

“Defining a catalog and its aliases” on page 339.<br />

Chapter 6. Catalogs 335

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

Saved successfully!

Ooh no, something went wrong!