- VSAM structures
- VSAM commands
- Performance tuning
- JCL Buffers
- LSR Buffers
- System Buffers
- VSAM parameters
- IAM, a VSAM alternative
- VSAM Recovery
- VSAM RLS, DFSMStvs
There are several products which have been developed to simplify catalog management. The following page lists the facilities offered by some of them. The first product, Integrated Catalog Forward Recovery Utility (ICFRU) from IBM, is a simple catalog recovery utility. The other products are Catalog Solution and Catalog Recovery Plus from Rocket Software, Catalog Information Manager from Host Systems and T-REX from Dino Software Corporation. These products are more sophisticated and have an ISPF interface to assist in generating JCL. Each product is summarised below.
The Integrated Catalog Forward Recovery Utility ICFRU is an IBM tool for basic catalog recovery that comes with z/OS 1.7 and above. It is not a full catalog management tool like the rest of the utilities on this page, but is useful to consider as a baseline for comparison purposes.
ICFRU does not have any diagnostics capability. For this you need to use the IDCAMS utility
ICFRU does not have a native backup facility; it relies on an IDCAMS EXPORT backup. If your catalog recovery plan will rely on ICFRU then you must schedule frequent EXPORTS of all your catalogs.
To recover a catalog with ICFRU you must have a valid IDCAMS EXPORT of the catalog from before it was damaged, and a full set of type 61, 65, and 66 SMF records (see the SMF page for details) from every LPAR that is connected to your faulty catalog.
The recovery process in outline then goes like this
ICFRU does not have any catalog reorganisation capability. You would need to use IDCAMS.
Catscrub is part of the CR+ product below but is also part of IBM's ABARS. The CATSCRUB command is intended to help when doing a disaster recovery test. It will sychronise the data in your catalogs with the actual restored data on disk. You can use the ABARS Manager Submit CATSCRUB panel to help you build a CATSCRUB command.
To do this, Go into ABARS manager, enter 4 in the command line to get the features panel, then enter 1 to get the Submit CATSCRUB panel. There is a good online help that describes the panel's fields.
What CATSCRUB does is compare each record in a catalog against the actual data sets on the disk storage volumes. If the records do not match reality you can delete the catalog record, depending on what options you specify.
The basic syntax is
CATSCRUB BCS(bcsnames) EXEC/SIM FAT-CAT-ERR(end/cont)
You can supply one BCS, a list of BCS names or a pattern mask. The Master Catalog must be named explicitly, it cannot be processed with a mask.
EXECUTE or EXEC means that you want to update the catalogs, SIM or SIMULATE means just test the command and see what will happen. It's obviously a good idea to run Simulate before you run Execute.
FATAL-CATALOG-ERR is optional and defaults to END. If you don't want the command to stop if it hits a fatal catalog error, use CONTinue.
Other parameters exist, such as Message-Text and Match-Volser.
An important set of keywords are the Anomaly Action Keywords, as these keywords are used to decide what to do if Catscrub finds a mismatch between catalog and storage. The options for these keywords include DELETE (the catalog entry) , KEEP (the catalog entry) set a Return code if this anomaly is found and decide whether or not to continue with the command.
The default values for all the Amomaly Action keywords below are (KEEP,RC=4,Continue)
The GDG-MIGRATED-TAPE is uses to determine what happens if an individual GDS entry is migrated to tape. The probability is that you have not taken a copy of your ML2 tapes to your DR site, so rather than get continuous recall failed errors, you may just want to delete catalog entries for migrated GDG files.
The GDG-TAPE keyword applies where the physical files were just created on tape and are not at the DR ste.
NONVSAM-MIGRATED-TAPE can be used in exactly the same way for non-GDG files.
The GDG-NOT-FOUND and the NONVSAM-NOT-FOUND keywords are used to decide what action to take where these files either do not exist at all, probably because the volumes they were stored on were not recovered.
Finally, what about multi-volume datasets, where maybe part of the dataset has been restored but part is missing? The NONVSAM-MULTI-VOL-ERR keyword can be used to decide what to do with those ones.
The VSAM-SPHERE keyword is the equivalent parameter used for VSAM component processing.
Catalog Solution was originally developed by Softworks, Inc. and was called VSAM Mechanic in its early days. At that time it was the only VSAM and Catalog management tool on the market. EMC bought out Softworks in January 2000, and transferred the licenses and support to Rocket Software in 2009.
Catalog Solution will check the VVDS and VTOCs against the BCS, and the BCS against the VVDS files. It automatically generate fixes if problems are found for both BCS and internal VVDS errors.
This can be done at individually catalog and VVDS level, or for every catalog and VVDS on the system using a single command. Catalog Solution uses SMS constructs like Storage class, Data class and Management class to select catalog entries by dataset.
Catalog Solution can also list specific dataset information from a BCS EXPORT file or from SMF data.
Catalog Solution can backup every connected catalog and VVDS with two commands, which means that you do not have to manually change the backup jobs when catalogs are added and deleted.
Catalog Solution will not automatically lock a catalog before a restore. It requires you to issue a query command to see if catalog is under VLF control, then manual issue MODIFY CAS and IDCAMS LOCK commands.
It reads the data portion during a backup then rebuilds the index on restore, so index errors are automatically fixed.
The BCSRECOVER command will automatically restore aliases to the Master Catalog.
The REBUILD command will automatically forward recover the catalog by reading data from SMF records to synchronise a BCS with VVDS and VTOCs. A VVDS can also be recovered from backup, and it too will be forward recovered with SMF records
Catalog Solution does have a reorganisation utility, but it appears that it needs the catalog to be in an unavailable locked status to do this.
Catalog Solution can resize a VVDS as part of the DUMP and rebuild process. It has a VOLSER rename function that will alter VVDS and BCS entries to match the new volume name. It can also repair a broken KSDS, and merge two KSDS files with identical attributes.
CR+ is developed and supplied by Rocket Software. It is also an IBM recommended product and is resold by them.
CR+ has 4 sub commands within its DIAGNOSE command;
DIAGNOSE ALIAS is used to compare two master catalogs and check the connections and alias relationships with their user catalogs
DIAGNOSE BCS-VVDS can be used both ways, to check for 'orphaned' BCS records or for 'orphaned' VVDS records.
DIAGNOSE VOL-BCS will check for uncatalogued datasets
DIAGNOSE VVDS-VTOC will check that VVDS entries are synchronised with the VTOCs
All functions will automatically generation commands to fix any problems that they find.
The backup command has two options; BACKUP BCS and BACKUP VVDS. You have the option to select catalogs for backup individually, by name masks, or every connected catalog with BACKUP BCS(**). A VVDS is selected by VOLSER, not the full VVDS name. BACKUP VVDS(**) will backup the VVDS on every online disk.
A PARALLEL keyword can be used to multi-task the backup and make it run faster.
Each Catalog is opened as a dataset rather than through Catalog Services. This means the processing bypasses the index so you can be sure to read all the data portion. Each BCS backup will copy the aliases definitions in the master catalog, though you can optionally turn that off. You also have the option to check the consistency of the catalogs at backup time by using keywords like DIAGNOSEBCS and DIAGNOSEVVDS.
The RECOVER command will only process one catalog at a time. The selected catalog will be locked by default. As the backup just reads the data portion of the catalog it must rebuild the index on restore, so guaranteeing index integrity with the data. If you kept the ALIAS keyword active on the backup, then the default action on restore is to rebuild all aliases in the master catalog.
The RECOVER BCS FORWARD option will read SMF dump files to recover a catalog to a point in time. It is also possible to forward recover a VVDS file from SMF records. The RECOVER command also has a simulate option for testing.
The RECOVER command also has a newname option that lets you recover a catalog to a different name.
A couple of useful options for DR is EMPTY-GDG, which will just recover GDG bases and the CATSCRUB command which will synchronise a catalog with the data on a specified set of volumes. This is useful if you do not recover all your data in a DR test. CATSCRUB can take numerous parameters, for example it can be set to delete all MIGRAT datasets.
CR+ can do a catalog reorg or a catalog mergecat while the catalog is open. This process also lets you change catalog attributes on the fly.
A single step MERGECAT function will move records between catalogs for alias balancing.
CR+ can be used to resize a VVDS, rename a VOLSER with a SUPERCLIP command and properly recatalog all data sets without unloading
and reloading them.
CR+ can rename a catalog with the RECOVER - NEWNAME option.
CR+ provides a fast way to split and merge catalogs. This can be required if your catalogs are too large and need to be split into smaller entities.
CR+ has a report writer option that allows you to put together search arguments using over 100 dataset attributes, so you can find all datasets that might be about to cause issues.
CR+ allows you to zap BCS, VVDS and VTOC records, using an onscreen formatting system that allows you to see the fields, cells, and sub-records that you might need to change. Not a recommended way to alter dataset metadata, but sometimes a zap is the only way to fix an issue.
Catalog Information Manager from Host Software is an ISPF driven system that generates batch jobs. I find it useful to be able to generate a batch job the first time I need that function using CIM, save the JCL and so build up a library of suitable jobs for running in future.
A quote from a CIM user; 'My last day before I was taking time off to get married and go on a week-long honeymoon, I inadvertently deleted a catalog index for our TSO catalog, no less! With the help of CIM, I was able to restore the most recent backup of the catalog and then forward recover, using SMF records. The whole process took less than 30 minutes, and I was still able to get to the church on time.' Some male cynics might say that was a good reason to stick with IDCAMS.
CIM has five principle diagnostics options from its main ISPF panel
VVDS/VTOC to check the physical, logical and SMS relationships between datasets on disk and in the VVDS
Usercatalog performs various checks on the user catalogs, including consistency with tape management catalogs
Mastercatalogs checks user catalog connections, aliases and VVDS relationships in master catalogs
Sams/Tms/Hsm/Rmm checks various tape management catalogs and the DFHSM MCDS and BCDS.
IDCAMS will generate standard IDCAMS diagnostic commands
All these commands can automatically generate fixes if problems are found.
The Catalog Monitor can continuously check the status of your catalogs and report problems by e-mail or TSO Notify.
CIM uses separate commands to backup catalogs and VVDS files. CAT=** will backup all connected catalogs. VVDS can be selected by SMS Storage Group.
You can optionally request that CIM does an index and data test at backup time.
CIM will backup catalog aliases, and also delete, define or restore them.
CIM will recover from a broken index if the backup used dump without index. A recovery will automatically rebuild aliases in the master catalog. CIM will lock a catalog before recovery starts and it also has commands to deallocate catalogs from VLF if VLF is used.
Forward recovery is automatic with the RECOVER command which reads SMF dump files. It is possible to forward recover several catalogs with a single command, recover a catalog to a new name and update an active catalog with SMF records.
CIM has comprehensive VVDS recovery utilities and can rebuild a VSAM KSDS without using the index.
CIM has the ability to reorganise a catalog while it is open, without affecting other running processes.
CIM functions include
Alter names in VVR/NVR
Alter dsname in VTOC
Alter or correct the catalog name in VVR/NVR's
Automatically reorganise catalogs
Compare two master catalogs
Define or re-define a non cataloged dsn
Define non cataloged multivoldsn
Define missing SYS1.VVDS
Delete VVR/NVR without using IDCAMS
Delete dsn from VTOC
Delete faulty catalogued datasets
Delete non cataloged dsn
Delete unreferenced catalog names
Delete orphaned VVR/NVR
Diagnose VVDS with IDCAMS for all associated catalogs
List VVR/NVR or validate VVR/NVR records in the cell structure
List dsn in VTOC
List all VVR/NVR (summary)
List catalogs in VVDS
Recatalog multi-volume datasets
Recover VVDS with SMF
Recover VVDS without SMF
Repro incorrectly catalogued datasets
Survey and report on all online catalogs
Update VVDS from backup
Update VVDS with SMF
Validate a catalog with a Tape Management System
Validate a master catalog and delete unreferenced datasets
Verify extent description and IRF
Verify duplicate/missing VVR/NVR
Verify catalognames in VVR/NVR
Zap a VVR/NVR record
Zap VTOC record
When EMC bought out Softworks, the original Catalog Solution developers left the company and formed DINO-Software. One of DINO-Software's products is T-Rex, a catalog management utility. The philosophy behind T-REX is to be able to run diagnostics then automatically fix errors from a single command. You also have to option to generate control cards that can be checked and run at a later time.
T-REX can check that multiple master catalogs are synchronised, that the VVDS/BCS and BCS/VVDS relationships are correct, and that HSM CDS files match the BCS. It will also verify various tape management catalogs against the ICF system. T-REX can automatically fix problems, or generate control statements to run at a later time.
The alias validation feature can automatically fix missing aliases, or remove unused aliases. T-REX can monitor multi-volume VSAM clusters and alert if any are approaching the 59 volume limit.
The T-REX EXPORT command can backup all BCS and VVDS files with a single command to multiple output files. As T-REX uses the IDCAMS EXPORT command for backup, it does not use the catalog index and so avoids the problem where a backup using the index appears to work fine, but is useless as the index was corrupt.
The DUMP command can also be used for VSAM clusters. T-REX is efficient at multitasking. It does its own performance analysis to determine the optimum number of tasks to run.
T-REX can also generate a point in time backup by combining a previous backup with SMF extracts. The backup can be either a T-REX backup or an IDCAMS EXPORT.
T-REX will always recover from broken index as dump without index is the default. By default it will lock a catalog before recovery and will automatically rebuild the aliases in a master catalog.
The ICFRU command provides automatic forward recovery from SMS dumps. There is also a VVDS recovery feature.
The IMPORT command will restore VSAM files, as well as Catalogs and VVDS files.
The DRIMPORT command is designed for disaster recovery test scenarios, where the full complement of disks have not been provisioned. This command can be used to just restore catalog entries for disks that exist, and so avoid issues with catalog entries that point to missing volumes. The SCRUB command is also intended to help here. It will synchronise BCS entries with online volumes, deleting entries that point to disks that do not exist.
T-REX can reorganise a catalog while it is open, and can remove imbed/replicate parameters while the catalog is open. You can also use T-REX to move a catalog that is open and allocated to CAS. This would be a very useful function where a catalog is on a small disk that is running out of space.
T-REX includes the following support for DFHSM: The AUDIT command has been enhanced to provide two levels of validation for Migration Control Data Set (MCDS) entries, complete structural verification and RECALL verification. RECALL functionality allows you to determine if a migrated entry can be successfully recalled. Relational inconsistencies do not always prohibit the recall of user's data.
The LISTHSM command will select BCDS, MCDS and OCDS records based of descriptive keywords and record relationships. With one control statement, you can select any record type and all of its related records, determine used entries that exist on an OCDS TTOC volume, and select entries that are related across different control data sets.
T-REX will maintain VVDS integrity if the VVDS is held in the coupling facility.
It can recovery GDG base catalog entries only, leaving GDG data files to be recovered and catalogued by a file restore utility like FDRABR or DFDSS. T-REX supports extended GDGs.
T-REX supports all 4 types of VSAM, as well as BCS and VVDS.
Re-cataloging of multi-volume VSAM is fully supported, and T-REX can also detect hardware changes and dynamically change performance parameters to suit.
T-REX will relabel DASD volumes containing catalogs, checking VSAM and nonVSAM data sets as part of the process to ensure consistency by updating and catalog entries pointing to data sets on the volume. To speed the process up, multiple catalogs are processed concurrently as separate subtasks.
T-REX can resize a VVDS
When you run an IDCAMS DIAGNOSE ICFCATALOG, you need to compare the catalog with all online volumes to seek out discrepancies. Each volume is identified with a COMPAREDD statement. T-REX has the ability to call and provide unlimited COMPAREDD supportand as been tested with over 4000 volumes.
T-REX can rebuild and synchronize your BCS with your TMC entries. This is accomplished through the AUDIT command. This is particularly useful in a DR setting to get the restored BCS completely in synch with the DR backup tapes shipped to the DR site.