Previous Topic Next topic Print topic


Support for Multiple Catalogs

Typically, just one catalog is used to hold the information about all datasets used in a batch region. However, you can use up to 64 user catalogs, in addition to the main (system) catalog. Note that catalog entries are independent of dataset locations. Refer to the section Controlling where Datasets are Created for details of how to specify where the underlying physical files are stored.

Using multiple catalogs

To enable multiple user catalogs in Enterprise Server, and to configure in which catalog a particular dataset's details are held, you must set the following two environment variables:

  • MFUSERCAT_NODE - this variable holds the node specification or pattern of datasets whose details should be stored in a separate catalog.
  • MFUSERCAT_LOC - this variable specifies the location and name of each user catalog.

Both MFUSERCAT_NODE and MFUSERCAT_LOC are limited to 4096 characters.

Note: If an entry in MFUSERCAT_LOC only specifies the file name of the user catalog rather than the full path and file name, the environment variable MFUSERCAT_BASE_LOC can be used to specify where these catalogs are located.

Both variables are required, and can hold multiple entries separated by semi-colons. A value specified in MFUSERCAT_NODE must have a corresponding value in MFUSERCAT_LOC. If the two lists do not contain the same number of entries, JES support for the ES region will not initialize successfully. See the Examples of using multiple catalogs section for more details.

When Enterprise Server performs a catalog search for a specific dataset, it first compares the dataset name to the patterns defined in MFUSERCAT_NODE. If the name matches one of the defined patterns, it looks in the corresponding catalog file (this is usually named catalog.dat, but can be any name) for the information for that dataset. If the dataset is not found in the selected user catalog, the system catalog will then be searched. Similarly, when a request is made to catalog a new dataset, its name will be compared to the patterns defined in MFUSERCAT_NODE, and if a match is found, it will be cataloged in the corresponding user catalog. If no match is found, it will be cataloged in the system catalog.

The ESMAC catalog list function will search all available catalogs for datasets matching the search pattern, without reference to the node list, and display the resulting dataset list in alphabetical order.

A new environment variable, MFUSERCAT_BASE_LOC can specify where user catalogs are located if only the file name is specified in the MFUSERCAT_LOC entry.

Special node values

There are two node values that have special meaning:

  • MVSSPOOL - this value can be used to direct catalog entries for all JES spool data files to a user catalog
  • SYSMFE1 - this value can be used to direct all SMS definitions (DATACLAS and/or MGMTCLAS) to a user catalog - see Using SMS Data Classes.

Examples of using multiple catalogs

Example 1

Consider the following example, where you might have some datasets with names that start with ABCD that should go into a catalog at C:\ABCD\CATALOG.DAT, and other datasets with names that start with WXYZ that should go into C:\WXYZ\CATALOG.DAT. Also, you might want to enable DATACLAS support (by setting MF_SMS=ON) and have an SMS catalog at C:\MAIN\SMS.DAT.

The MFUSERCAT_NODE variable must include the special SMS node, SYSMFE1, the ABCD node and the WXYZ node:

MFUSERCAT_NODE=SYSMFE1;ABCD;WXYZ

MFUSERCAT_LOC must include the corresponding locations for these catalogs:

MFUSERCAT_LOC=C:\MAIN\SMS.DAT;C:\ABCD\CATALOG.DAT;C:\WXYZ\CATALOG.DAT

Example 2

As the environment variable MFUSERCAT_NODE supports multiple dataset nodes and wildcards, you can use quite complex rules to direct catalog entries to specific user catalogs.

Consider the following definitions:

MFUSERCAT_NODE=MVSSPOOL;*.WORK;PROD??.VSAM;PROD??.SEQ;PROD??.LIB;USER01;USER02
MFUSERCAT_LOC=C:\MAIN\SPOOLCAT.DAT;C:\WORK\CATALOG.DAT;C:\PROD\VSAM\VSAMCAT.DAT;C:\PROD\SEQ\SEQCAT.DAT;C:\PROD\LIB\LIBCAT.DAT;C:\USER\USERCAT.DAT; C:\USER\USERCAT.DAT

The first node, MVSSPOOL, directs the catalog entries for all JES spool datasets to C:\MAIN\SPOOLCAT.DAT.

The second node, *.WORK, directs the catalog entries for all datasets whose second level qualifier is WORK to C:\WORK\CATALOG.DAT.

The third, fourth and fifth nodes direct the catalog entries for all datasets whose high level qualifier is six characters long, and begins with the string PROD, to catalogs specific to the dataset type, coded as the second level qualifier, VSAM, SEQ, and LIB.

The last two nodes direct the catalog entries for all datasets whose high level qualifiers are USER01 or USER02 to the same user-dataset catalog.

All other datasets will be cataloged in the system catalog, as specified under the MSS > JES tab, or via the environment variable MFSYSCAT.

Previous Topic Next topic Print topic