The catalog import-export utility is supplied to make it easier to work with the contents of a catalog. You can use the catalog import export utility to:
This utility is intended as a tool for use during migrations. It is definitely NOT recommended that you use it for editing the catalog data for live systems. The recommended way of manipulating catalog entries is via JCL, where consistency can be guaranteed. For bulk changes to the PC-DSN field, MVSPCRN is recommended.
Use caution when performing catalog updates. Setting inconsistent field values will cause errors.
set MFSYSCAT=c:\test\project\catalog.dat
Call MVSP0033 using ws-command-line
In the command above,
ws-command-line is a command with the syntax and parameters described below.
MFCATXML FUNC(xxxx) INFILE(filename) OUTFILE(filename) KEY(xxxx)
The function's operation, and the parameters that you use, varies depending on the value of the FUNC parameter.
Reads details for specified catalog records and writes them to a file.
INFILE(filename) | The catalog entries for all the MVS DATASET names found in the XML document filename are retrieved |
KEY(datasetname) | The record for the single MVS dataset name in the datasetname parameter is retrieved |
KEY(@filename) | The records for all the MVS dataset name in the filename parameter are retrieved. filename must be a text file with each successive dataset on a new line. |
OUTFILE(filename) | The output file for the catalog records. |
Reads catalog record details from INFILE and inserts these catalog records.
Reads catalog record details from INFILE and replaces corresponding existing catalog records.
Deletes catalog records.
INFILE(filename) | Deletes catalog entries for all the MVS DATASET names found in filename. |
KEY (datasetname) | Deletes the record for the single dataset name set defined in datasetname. |
KEY(@filename) | Deletes all of the catalog records for all the MVS dataset names listed in filename. This file must be a text file with each successive dataset on a new line. |
The following command creates the OUT.XML XML file that contains all of the data held in the catalog identified in the MFSYSCAT environment variable.
MFCATXML FUNC(EXP) OUTFILE(OUT.XML)
The resulting XML file can be edited and then imported using the following command:
MFCATXML FUNC(IMP) INFILE(OUT.XML)
When exporting large catalog files (>100,000 records), the export process spreads the contents over multiple XML files, to avoid memory problems. After the first file, subsequent files are appended with 001, 002, 003, etc. When importing one of these large catalog files, you must remember to run the import on each generated .xml file.
To set the threshold at which an additional .xml file is generated on export, set the MF_MVSP0034_LIMIT environment variable to the required threshold (number of records). The default is set to 100,000 records.