You can configure your JCL environment to use the native database file handler, where catalog.dat and catalog files can be stored in a database.
This requires setting a number of environment variables within the JES region, and then configuring JES Mainframe System Support to use the datastore(s) you configured. Use the dbfhdeploy to move the catalog files from disk to the database.
You need to set the following environment variables in the Configuration Information field, for each of the enterprise server regions in the PAC:
Variable setting | Description |
---|---|
ES_DB_FH=Y | Enables the Micro Focus Database File Handler |
MFDBFH_CONFIG=<path-filename-config-file> | Locates the configuration file containing the list of data sources and their database types |
MFDBFH_SCRIPT_DIR=<path-to-scripts> | Locates the stored procedures required for Enterprise Server to interact with a database |
If you are configuring a JCL environment from scratch, that is, the catalog is currently empty, then the required catalog file and specified folder structure is created on completion of the first job that is run.
The following example configures an enterprise server region in Enterprise Server Common Web Administration (ESCWA). It creates a catalog.dat file, if one does not already exist, within the CAT folder in the PGJCLCAT datastore:
Repeat steps 3 through 10 for each enterprise server region in the PAC.
The Default Allocated Dataset Location field, specifies the creation of a sub-folder from the location of the catalog file for any cataloged data sets. The two options specified form the values of the MFSYSCAT and MFALLOC_LOC environment variables respectively.
If you are moving an existing catalog, the method of data set storage will determine which files you move to the database. If the data sets are stored relative to the catalog, you should move catalog.dat and all its data sets from disk to the same datastore. You can use the dbfhdeploy command line utility to upload the files and create the required folder structure to ensure that the relative file locations are maintained; that way, no changes to the catalog are necessary.
If an existing catalog contains absolute paths to its data sets, or the default data set allocation method (for example, when using ES_ALLOC_OVERRIDE) is different to or not relative to the catalog folder, you can either keep the data sets stored on disk, or you can move data sets to the database. If you do move a data set cataloged with an absolute path, you are required to re-catalog the entry, updating it with its new physical file location within the database.
Micro Focus recommends that both the catalog.dat and all its data sets reside in the same datastore.
You do not need to make any code changes to your batch application's source code to use files within a datastore.
If the enterprise server region running your JES environment terminates abnormally whilst any data files are open, Enterprise Server attempts to recover the files automatically. If you continue to receive errors accessing files (for example, file locked statuses), run the dbfhadmin command line utility to recover the files.