The syntax of the CATNAME statement is:
CATNAME libref.catref
(libref-1.catalog-1 (ACCESS=READONLY)
libref-n.catalog-n (ACCESS=READONLY));
To disassociate a concatenated
catalog the syntax is:
CATNAME libref.catref | _ALL_ clear;
In the following example,
there must be a libref that is defined and named CATDOG. The libref
CATDOG establishes the scope for the CATNAME concatenation definition.
Note: If a file in CATDOG named
COMBINED.CATALOG already exists, it becomes inaccessible until the
CATNAME concatenation CATDOG.COMBINED is cleared.
If we issue the following
statement,
CATNAME catdog.combined
(library1.mycat (ACCESS=READONLY)
library2.mydog (ACCESS=READONLY));
then the concatenated
catalog CATDOG.COMBINED combines the following catalogs:
Concatenated catalog
CATALOG.COMBINED
|
MYCAT.CATALOG (from
library 1)
|
MYDOG.CATALOG (from
library 2)
|
Note: In CATNAME concatenation
only the named catalogs are combined. In LIBNAME concatenation, any
catalogs that have the same name in their respective libraries are
concatenated when those libraries are concatenated.
The previous CATNAME
statement creates a catalog that exists logically in memory. This
catalog, named CATDOG.COMBINED.CATALOG, combines the two physical
catalogs residing in library1 and library2, called MYCAT.CATALOG and
MYDOG.CATALOG respectively.
To understand the contents
of the concatenation COMBINED.CATALOG, first look at the contents
of both parts of the concatenation. The two original catalog files
contain the following entries:
The concatenated catalog
COMBINED contains:
COMBINED.CATALOG contents
|
|
|
|
|