FDRABR data set selection
Archive backup and Superscratch
For an Archive Backup (DUMP TYPE=ARC) or Superscratch (DUMP TYPE=SCR) operation, ABR uses the following rules for data set selection:
- If SMSMANAGE=YES is specified on the DUMP statement, SMS-managed data sets are selected for ARCHIVE or Superscratch based on the attributes of their associated SMS management class as described in Working-with-System-Managed-Storage. If a data set is selected by its SMS attributes, there is no option to exclude it; it is archived or scratched. If it is not selected by SMS, you can optionally let ABR SELECT statements determine if it should be selected (SMSCOMMAND=YES).
- If the ABR Archive Protect List (for TYPE=ARC) or Scratch Protect List (for TYPE=SCR) is enabled (see Define-the-ABR-Protect-Lists-and-Restore-Allocation-List), all data sets that match entries in the protect list are excluded.
- If the ABR job includes SELECT statements, those statements are compared to every data set on every volume processed by ABR. The SELECT statement contains one set of operands, called Data Set Selection Criteria, used to determine if the SELECT matches a given data set, such as DSN=, VOL=, DSORG=, and so on. If the data set matches all of the Data Set Selection Criteria specified, it is selected by that SELECT statement but not necessarily archived. Otherwise, the data set is compared against the following SELECT statements.
- SELECT statements can contain a second set of operands, known as Archive Selection Criteria. They include attributes such as IFNOTCAT (archive if not cataloged) and ADAYS=nn (archive if not opened in the last nn days). If the SELECT that matched a particular data set contains one or more of the Archive Selection Criteria, it is archived if it matches any of those criteria, and it will remain on DASD if not. If the SELECT contains none of the Archive Selection Criteria operands, the data set is unconditionally archived.
- The DUMP statement can optionally contain additional General Archive Selection Criteria operands, similar to those on the SELECT statement. If a given data set was not selected by any SELECT statement, but the DUMP statement contained criteria operands, the data set is archived if it matches any of those criteria. This is also true if there are no SELECT statements.
ABR will read the VTOC of every DASD volume in its volume list (see FDRABR-processing-options-and-requirements) and execute the selection process described above against every data set it encounters.
If the ADATE= or ADAYS= operand is specified, ABR will examine the last reference date that IBM stores in the Format 1 DSCB of every data set when it is opened. If it is less than ADATE or today's date minus ADAYS, the data set is archived or scratched.
ABR allows users to request that certain data sets be included in the next archive, if the volumes containing those data sets are processed, using a “remote queue”. Details are in Remote Queue in FDRABR-processing-options-and-requirements
This selection process can be confusing, so here are some examples of the different ways that you could select data sets for archive:
- General Archive Selection Criteria on the DUMP statement and no SELECT statements, for example,
DUMP TYPE=ARC,ADAYS=15,IFNOTCAT
All data sets on selected volumes are compared to the criteria. Those that are uncataloged or unused in the last 15 days are archived.
- No criteria on the DUMP statement and SELECT statements with Archive Selection Criteria, for example,
DUMP TYPE=ARC
SELECT ALLDSN,ADAYS=15,IFNOTCAT
This is equivalent to the previous example.
DUMP TYPE=ARC
SELECT DSN=XYZ**,ADAYS=15,IFNOTCAT
All data sets on selected volumes starting with “XYZ” are controlled by this SELECT. Those that are uncataloged or unused in the last 15 days are archived.
- No criteria on the DUMP statement and SELECT statements with no criteria, for example,
DUMP TYPE=ARC
SELECT DSN=XYZ**
All data sets on the selected volumes that start with XYZ are unconditionally archived.
- General Archive Selection Criteria on the DUMP statement and SELECT statements, for example,
DUMP TYPE=ARC,ADAYS=30,ONLVOL
SELECT DSN=ABC**,VOLG=TSO
SELECT DSN=XYZ**,ADAYS=15,VOLG=DB
All data sets starting with “ABC” on TSO volumes are unconditionally archived. All data sets starting with “XYZ” on DB volumes are archived if they have not been used in 15 days. All other data sets on the selected volumes are archived if they have not been used in 30 days. This combination allows you to specify general criteria for most data sets while defining specific criteria for special groups of data sets.
VSAM clusters
ABR can only Archive or Superscratch VSAM files by cluster name. You cannot select individual components. Once ABR selects a cluster from a volume, all components of the cluster on that volume (including alternate index components) are dumped.
Catalogs cannot be archived or scratched.
Multi-volume VSAM (clusters with components or parts of components on multiple DASD volumes) are scratched only if all the volumes on which the cluster exists are processed in the same ABR step, and the cluster is selected from all of its volumes.
IBM stores the last reference date only in the Format 1 DSCB on the first volume of the data component of the base cluster (see VSAM-Special-Considerations for more details). If it is selected, all components on the volume containing that DSCB are selected. For multi-volume VSAM, if ADAYS= or ADATE= is specified, ABR reads the DSCB of the base data component on its first volume to get the current last reference date.
Exceptions to automatic archiving
The following data sets are never selected for Archive or Superscratch:
- For Archive, data sets in the ARCHIVE PROTECT LIST, if the protect list is enabled in the FDR Global Options (ARCPROT / PROTECT). For Superscratch, data sets in the Scratch Protect List if enabled (SCRPROT / SCREXCL).
- Data sets marked “do not archive”, that is, data sets for which OPTIONS=AD, ND, or EX have been set with program FDRABRM.
- Data sets on volumes whose ABR Model DSCB indicates “Disabled for Archive” for TYPE=ARC or “Disabled for Superscratch” for TYPE=SCR. These flags are set by program FDRABRM or the ABR TSO/ISPF panels.
- Data sets that begin with the ABR prefix (normally “FDRABR” unless overridden in the FDR Global Options). However, if SELECT ABRBKUP is specified then ABR will select ABR backup data sets that are expired.
The following data sets will not be selected by General Archive Selection Criteria on the DUMP statement or by a SELECT ALLDSN statement, but can be selected by other SELECT statements with more specific DSN= operands, including DSN=**:
- Data sets prefixed by SYS1.
- OS PASSWORD data set
- SYSCTLG data set
- Temporary data sets. If you want to select temporary data sets, specify SELECT TEMP preceding any SELECT ALLDSN or any other SELECT that would select the same data sets. DSNENQ=USE and CRDAYS=1 are recommended to be sure that temporary data sets in use will not be selected.
- Data sets found to be in-use when using the data set enqueue option (DSNENQ=), unless ENQERR=PROCESS is specified.
- Data sets with a last reference date of zero (00000) if data set selected by ADAYS= or ADATE=.
- Model DSCBs (data sets with no extents).
If a data set is selected by a SELECT statement and not excluded by a preceding EXCLUDE statement, it is archived or scratched unless it matches one of the first four bullets in the above list. If a data set is selected by a SELECT ALLDSN statement, it is archived or scratched unless it falls into any of the categories listed above.
Seldom-Opened data sets
There is one situation that “fools” Archive Backup into archiving data sets that are really in use. The Last Referenced Date in the Format 1 DSCB of a data set is updated only when the data set is actually opened. If a job has a DD statement referencing the data set but does not open it, the date is not updated. This may cause the data set to be archived, since it appears that it has not be recently used, yet it will be immediately recalled the next time that the job is run. This is useless effort, and delays the start of the job while the recalls are done.
The most common occurrence of this involves CICS, specifically a test CICS region that may have DD statements pointing to test data files for a variety of applications. CICS may not open those test files unless the associated application is being updated or tested, so it may not open some of those files for months. If ABR archives them, they are recalled the next time that the test CICS region is started.
If you can identify such data sets, you may want to add them to the Archive Protect List so that they are never archived.
Archive control file backup
ABR normally backs up the Archive Control File (ACF) at the end of each Archive Backup step. Since the ACF is necessary for the restore of archived data sets, it is backed up immediately for safety. For tape output, this backup becomes the last file on the last active output tape. For DASD, it is allocated on one of the output DASD volumes.
Two types of backup are available for the Archive Control File:
- The default (ARCBACKUP=ABR) causes an ABR incremental volume backup of just the Archive Control File; essentially it does an ABR DUMP TYPE=DSF selecting only this one data set. It does become part of the Volume Backups for the volume the ACF resides on, so you must be doing Volume Backups of that volume. It increments the Cycle number for that volume and uses the naming convention of ABR Volume Backups as described in Tape Format and Naming Conventions in FDRABR-Volume-Backups-introduction It may result in a full-volume backup. If it is necessary to use ABR to recover that volume from backups (RESTORE TYPE=FDR), ABR has to read all of the regular incremental backups and all the incremental backups containing only the ACF, even though it uses only the most recent. For these reasons, ARCBACKUP=ABR is not recommended (remember that it is the default).
- The second type of backup (ARCBACKUP=DSF) causes ABR to use FDRDSF directly (not through the ABR incremental system) to backup the ACF. The backup file has the same data set name as the ACF itself, except that the index level of “ARCHIVE” is changed to “ARCBKUP” for TAPEx and “ARCBKU2” for TAPExx (if duplicate backup). This cataloged name only keeps track of the most current backup.
For example, if the ACF is named “FDRABR.ARCHIVE.RECALL” the backup files containing the DSF backup of that data set is named “FDRABR.ARCBKUP.RECALL” and “FDRABR.ARCBKU2.RECALL”.
If the Archive job is backing up to DASD, ABR defaults to not backing up the ACF (ARCBACKUP=NO). This default should not be overridden.
Restore from archive backup
In most cases, archived data sets are restored automatically by ABR Auto-Recall, described in detail later in ABR Auto-Recall – Introduction. However, you can manually restore archived data sets at any time.
To restore a data set from Archive Backup, you must execute an ABR “RESTORE TYPE=ARC” job and provide one or more SELECT statements to identify the data sets required. The job can also specify the Archive Control File (ACF) to be used for the restore, but in most cases there is only be one ACF for all archived data sets in your installation.
Since the ACF is organized in chronological order based on Archive date, ABR searches for the data sets requested by reading it in reverse order. If a data set has been archived more than once, this finds the most recently archived version. If you want a different version, you can specify ADATE= (date of archive) or OLDBACKUP= (relative archived version) to tell ABR which version to restore.
If a multi-volume data set was archived, each volume has a separate entry in the ACF, but each is flagged to indicate it was part of a multi-volume entry. ABR continues to search the ACF until it finds all of the entries belonging to the data set.
If NEWNAME, NEWGROUP, or NEWINDEX is specified, the data set is restored using the new name; otherwise, it is restored using its original name. If NVOL= is specified, the data set is restored to that specified volume serial (or the first volume serial number specified); otherwise the catalog is searched for the output data set name (either the original name or the new name). If found, the data set is restored to the volume serial specified in the catalog; if not found, the restore is attempted to the volume serial from which the data set was archived.
The restore process is identical to that of FDRDSF. Please review DSF-Technical-Summary for details on allocating, restoring, and cataloging data sets during the restore. Archive Restore Procedure in Archive-RESTORE-statement contains details on output volume selection for ABR restores.
ABR defaults to restoring from COPY1 of each Archive Backup required unless COPY1 was not created or has expired. COPY2 is then selected if it exists. If TAPE=EXP is specified, ABR ignores the expiration date test and attempts to restore from COPY1 even if it is expired.
The ABR Restore Protect List, documented in Define-the-ABR-Protect-Lists-and-Restore-Allocation-List, lists data sets or groups of data sets that are not to be restored, similar to EXCLUDE statements. Any attempt to restore those data sets from volume backups or archive backups fails (except for full-volume recovery from volume backups).