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.
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:
Both MFUSERCAT_NODE and MFUSERCAT_LOC are limited to 4096 characters.
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.
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
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
tab, or via the environment variable MFSYSCAT.