For users looking to limit their VSAM file reorganizations to only the files that are in need of being reorganized, Faver2 and Mastercat make a good place to start. Using Mastercat's extensive search criteria you can choose to find the files that have gone into multiple extents, those with CA and CI splits, or even ones about to expire. Mastercat provides an interface to Faver2 that allows the list of chosen candidates to be captured to a file that Faver2 can simply read in and port to its backup selection list, eliminating the need to key in all of those datasets manually. This ensures that only the datasets in need of reorganization are selected to be backed up, resulting in shorter backup windows for your nightly backups.
Release: 3.4
Component: MASTERCAT-VSAM Catalog Management
Add the parameter FVRLIST to your MasterCat job stream. The FVRLIST parameter is used to specify a SAM or SAM/ESDS to which MasterCat writes its output. The records in the file containing the names of all the selected clusters can be used as control cards in Faver2 STORE and LOAD job streams.
The number is variable and depends on the number of clusters to be held by the sequential file.
The following example finds datasets that are in need of reorganization by searching for files that have gone into more than 10 extents and have CA splits greater than 50:
// ASSGN SYS000,DISK,VOL=SYSWK1,SHR
// DLBL ddname,'fvrlist.file',0
// EXTENT SYS000,SYSWK1,1,0,35,10
// EXEC MASTERCT,SIZE=AUTO
LISTC CATALOG(VSE.USER.CATALOG)
FVRLIST (ddname)
SEARCH ((EXTENTCNT > 10) AND (CASPLITS > 50))
The following example will find datasets that may be wasting space.
This sample will search for files that have a Freebyte range greater than 20K with a last update prior to January 1:
// ASSGN SYS000,DISK,VOL=SYSWK1,SHR
// DLBL ddname,'fvrlist.file',0
// EXTENT SYS000,SYSWK1,1,0,35,10
// EXEC MASTERCT,SIZE=AUTO
LISTC CATALOG(VSE.USER.CATALOG)
FVRLIST (ddname)
SEARCH ((FREEBYTES > 20000) AND (LASTUPD < 20050101))
To have Faver2 use the FVRLIST, add the FAVER2 equivalent of that card called MCTLIST. The ddname specified in MCTLIST should contain the same DLBL information that will point to the same file ID that Mastercat's FVRLIST had created.
For example this job will perform a FAVER2 STORE of a MasterCat-created FVRLIST of clusters to back up:
// ASSGN SYS000,DISK,VOL=SYSWK1,SHR
// DLBL ddname,'fvrlist.file',0
// EXTENT SYS000,SYSWK1,1,0,35,10
// EXEC FAVER2,SIZE=AUTO
STORE MCTLIST(ddname)
FAVER2 will take care of the rest. You may also include other clusters to be stored to the job via the DSN parameter. For example:
STORE MCTLIST(ddname) DSN(cluster)
Once the Store has been achieved you may also make use of the MCTLIST parameter on FAVER2's LOAD if you wish to load exclusively from the MCTLIST. Simply repeat the parameter MCTLIST, this time specifying LOAD. For example:
LOAD MCTLIST(ddname).
FAVER2's LOAD will create its restore list via the same Mastercat-generated list.