SELECT, EXCLUDE, and MOUNT Statements
SELECT and EXCLUDE statements syntax
Data set selection criteria
SELECT|EXCLUDE | |
---|---|
DSN=filter|CATDSN=filter|DD=ddn|ABRBKUP|ABRBKUP=vol|TEMP|ALLDSN | |
,CRDAYS=dddd | |
,DSORG=([DA][EF][PO][PS][UM]) | |
,GDG | |
,SIZE=nnnnn | |
,VOL=vol|VOLG=volg|ALLVOL |
Additional SELECT statement operands
Additional operands that can be specified on the SELECT statement are:
Additional SELECT statement operations
… | |
---|---|
,CATALOG=cat|MCATALOG=cat | |
,CATLIMITGDG=n | |
,DATA=ALL | |
,PRTALIAS | |
,UPDATE |
Archive selection criteria
If a data set matches the Data Set Selection Criteria from Data Set Selection Criteria:
- If any of the Archive Selection Criteria are specified, and at least one of those is met, the data set is archived.
- If any of the Archive Selection Criteria are specified, but none of those are met, the data set will NOT be archived.
- If none of the Archive Selection Criteria are specified, the data set is archived.
Archive selection criteria
… | |
---|---|
,ADATE=[yyddd|yyyyddd]|ADAYS=dddd | |
,EXPIRED | |
,IFNOTCAT | |
,MAXGDG=nnn |
MOUNT statement syntax
MOUNT | VOL=vol|VOLG=volg|STORGRP=storg |
---|
SELECT and EXCLUDE statements
These statements select additional data sets to be archived or scratched or exclude them from processing.
The SELECT statement has two purposes with Archive and Superscratch.
- It can be used to unconditionally select data sets to be archived or scratched. The SELECT statement contains only Data Set Selection Criteria operands from the Data Set Selection Criteria. As ABR scans the VTOC of every selected volume, it compares each data set to those specifications and archives or scratches any data set that matches all of the criteria specified.
- It can be used to specify the criteria for archiving or scratching special groups of data sets. In addition to the Data Set Selection Criteria, it contains one or more Archive Selection Criteria operands. For every data set selected by the Data Set Selection Criteria, ABR archives or scratches only those data sets that match one or more of the Archive Selection Criteria.
An EXCLUDE statement identifies data sets from within those selected by SELECT statements that are not to be processed; it can also be used to exclude data sets that would otherwise be selected by Archive Selection Criteria on the DUMP statement.
All data sets in the VTOCs of DASD volumes processed by ABR are compared to these statements to identify those to be processed; each data set is compared to each control statement until a match is found. It must match all Data Set Selection Criteria specified on the statement to qualify, for example, if DSN= and DSORG= are both specified, it must be a data set with the right name, having the indicated organization. A maximum of 100 of these control statements may be used in one execution unless overridden by MAXCARDS=.
The control statements are always scanned in the order in which they were input, so in general, EXCLUDE statements should precede SELECT statements. Since ABR will only archive or scratch data sets that are selected, EXCLUDE statements can be used to exclude certain data sets from within a larger group on a SELECT statement.
Example 1. Select all data sets with a first index of “A” except those with a second index of “B”:
EXCLUDE DSN=A.B.** SELECT DSN=A.**
Example 2. Select all data sets except partitioned (PDSs):
EXCLUDE ALLDSN,DSORG=PO SELECT ALLDSN
You can also use an EXCLUDE ALLDSN statement with VOL= or VOLG= to specify entire volumes that are not to be processed by ABR. This is a way to exclude certain volumes that would otherwise be selected by the ONLINE or ONLVOL operands or MOUNT statements.
See FDRABR-Data-Set-Selection for more details on data set selection.
MOUNT statement
The MOUNT statement is used to specify additional volumes to be processed by ABR. VOL=, VOLG=, or STORGRP= must be specified. STORGRP= can be used only on systems with SMS active; it will select all volumes in the specified SMS storage group. MOUNT statements should follow SELECT/EXCLUDE statements, if any.
VSAM clusters
VSAM clusters can be selected by specifying the fully-qualified base cluster name or matching on the base cluster with generic data set selection. When selected, all components of that cluster that exist on the volumes being processed are archived or scratched, including Alternate Indexes (AIXs) and key range components. ABR does not examine VSAM component names when processing SELECT and EXCLUDE statements; components are selected only if their cluster name is selected. For further information, see VSAM-Special-Considerations.
If a cluster spans multiple DASD volumes, it is properly archived or scratched only if all of the volumes containing a piece of the cluster are processed in this ABR step.
SELECT, EXCLUDE, and MOUNT statement operands
Specifies a fully-qualified data set name or a filter to be used for generic data set selection, as described in Generic-Data-Set-Name-Selection. This name or filter is used when scanning the VTOCs of selected volumes. For VSAM clusters, only the cluster name is compared; you cannot select by component name. For example:
DSN=USER1.JCL.CNTL
DSN=**LIST
DSN=PROD++.**.LIB*
DSN= cannot select GDGs by relative generation number; use DD= or CATDSN= for that purpose.
Specifies a fully-qualified data set name or a filter to be used for generic data set selection from system catalogs, as described in Generic-Data-Set-Name-Selection.
If a fully-qualified name is specified, that name is located in the system catalogs, and the volume serials from the catalog become an implied VOL= operand (you should specify the ONLVOL operand so that those volumes are automatically added to the ABR volume list for processing). Specification of a relative generation number for GDG data sets is supported, for example, CATDSN=A.B(-1).
If a filter is specified, then catalogs are scanned for all cataloged data sets matching the filter, and they are processed as if a SELECT CATDSN=dsname was present for each of them. It may be necessary to specify MAXCARDS=nnnnn if a large number of data sets are selected by the filter.
Additional considerations for CATDSN=filter are explained in Generic-Data-Set-Name-Selection. For VSAM clusters, the filter is only compared to the base cluster name. Component names, PATH names and AIX (alternate index) cluster and component names are not tested.
CATDSN= is supported only on SELECT statements. However, a preceding EXCLUDE statement with DSN= and/or VOL= can exclude data sets from selection by CATDSN=.
If the VOL= operand is also specified on a SELECT statement with CATDSN=, then only data sets cataloged to those volumes are selected. For example:
CATDSN=USER1.JCL.CNTL
CATDSN=PAY**MASTER(0)
CATDSN=PROD++.**.LIB*
Normally, CATDSN= does not display the data sets it selects from the catalogs, you see the names only when ABR actually finds and selects the data sets in the VTOCs of the volumes they are cataloged to. To display all of the data sets selected specify PCATDSN=filter.
Specifies that a data set name is to be taken from a DD statement. The value is the ddname of a JCL statement in the ABR step. Using this option lets you specify a non-standard data set name or a Generation Data Group (GDG) relative generation. For example:
SELECT DD=DD1
//DD1 DD DSN=A.B.C(0),DISP=SHR
ABRBKUP
Specifies that ABR is to select ABR backup data sets currently on DASD that have expired (reached their expiration date). This operand can be used with Superscratch (TYPE=SCR) to clean up volumes containing ABR backups that are no longer needed.
If ABRBKUP is specified alone, than all expired ABR backup files are selected.
If ABRBKUP=volser is specified then only backups containing data sets from volume “volser” are eligible. “volser” may contain filter characters, such as ABRBKUP=TSO+++ to select volumes called TSO plus 3 digits (see Generic-Data-Set-Name-Selection).
Specifies that ABR select all non-VSAM data sets that have a name in the format that the system uses for temporary data sets. This may be used with TYPE=SCR to clean up temporary data sets that were not automatically deleted at job termination. It is recommended that CRDAYS=2 also be specified to insure that active temporary data sets are not selected.
Specifies that all the data sets encountered on the volumes specified are selected.
DSN=, CATDSN=, DD=, TEMP, ABRBKUP, and ALLDSN are mutually exclusive. One and only one of them must be specified on each SELECT, EXCLUDE, PROFILE, and PROTECT statement.
Any selected data set that has not been opened since the date specified is archived or scratched. The last reference date is stored in the Format 1 DSCB of a data set by IBM when it is opened. The date is specified in Julian format with a 2-digit year “yyddd” or a 4-digit year “yyyyddd”. If the 2-digit year is used, year numbers less than 70 are assumed to be in the 21st Century (for example, 20123 = 2020.123).
Any selected data set that has not been opened in dddd days is archived or scratched. The last reference date is stored in the Format 1 DSCB of a data set by IBM when it is opened. The value specified is subtracted from today's date to calculate a date dddd days in the past. If the result is greater than the last referenced date, the data set is selected.
Specifies the name of a user catalog (CATALOG=) or alternate master catalog (MCATALOG=) to search when CATDSN= is specified. See Section 80.6 “Generic Data Set Name Selection” for details.
Default: The catalog search starts with the active master catalog. User catalogs are searched if their assigned aliases match the CATDSN=filter.
May be used with CATDSN=filter to limit the selection of GDGs from the catalogs. It does not affect the selection of cataloged non-GDG data sets, but if the filter selects a GDG then:
n
Causes only the most recently created “n” generations to be selected.
–n
Causes only generation “–n” to be selected.
Default: All the generations of selected GDGs are selected unless a relative generation number is specified at the end of the filter, for example, CATDSN=filter(-2).
Data sets are not selected unless they are at least “dddd” days old. A creation date is stored in the Format 1 DSCB of every data set when it is created. The value specified is subtracted from today's date to calculate a date “dddd” days in the past. If the result is greater than or equal to the creation date, the data set is selected. For example, CRDAYS=0 means “today” and all data sets would be eligible regardless of date; CRDAYS=1 means “yesterday” and all data sets created yesterday or before would be eligible.
Default: 0, unless IFNOTCAT is specified then 2 days is assumed.
Specifies that Archive backs up the entire allocated space of the selected data sets. Normally it only processes up to the last block pointer (end-of-file) on input PS or PO data sets. It can be used if the last block pointer of certain data sets is invalid.
Specifies that these data sets are not to be selected unless DSORG matches one of the DSORG values specified. If more than one DSORG is specified, they must be enclosed in parenthesis. Valid DSORG values are:
DA
BDAM
EF
VSAM
PS
Sequential
PO
Partitioned
UM
Unmovable
UN
Undefined
EXPIRED
ABR is to archive or scratch selected data sets if the expiration date stored in their Format 1 DSCB is equal to or less than today's date. This option does not select data sets with an all-zero expiration date or a special expiration date (99.000, 99.365, or 99.366). The expiration date is not checked on VSAM files, unless they are SMS-managed. If SMSMANAGE=YES is specified on a TYPE=SCR run then expired data sets on SMS-managed volumes are not scratched unless EXPIRED is also specified.
Data sets are not selected unless they are generations of a Generation Data Group (GDG).
ABR is to archive selected non-VSAM data sets that are either not cataloged, or cataloged but to a volume other than the one they are selected from. If the proper catalog is not available or any other catalog error exists, ABR does not use this selection criterion. By default, ABR does not archive uncataloged data sets if they are less than 2 days old, unless overridden by using the CRDAYS= operand. A time delay is necessary to avoid archiving active data sets that are cataloged at the end of the step or job that is creating them.
Default: The catalog status of data sets is not checked.
nnn
ABR is to archive or scratch the data sets selected if they are generations of a Generation Data Group (GDG) and are not within “n” generations of the most current generation recorded in the catalog. “n” can be from 1 to 255. (Ex: MAXGDG=2, ABR keeps the two most current entries, archiving all others if found.) If you use MAXGDG=, you should also specify CRDAYS= or DSNENQ= to avoid selecting data sets that are in the process of being created.
When used on a SELECT statement with CATDSN= displays all of the alias names and user catalogs that were searched, if the mask provided causes the search to start in the master catalog.
nnnnn
Data sets are not to be selected unless their size in tracks is equal to or larger than the size specified. For VSAM clusters, the size is checked for each of the components. If SIZE is to be specified in more than one SELECT statement for the same group name, they must be coded in descending sequence (the largest first).
The maximum value that can be specified for SIZE= is 65535.
storg
Can only be used on the MOUNT statement. It selects all online volumes in the specified SMS storage group. For example: MOUNT STORGRP=DBLARGE causes ABR to process all volumes in that storage group.
Data sets that match this SELECT statement are selected only if the update indicator is set in their Format 1 DSCB, indicating that it has been updated since the last ABR Volume Backup (FDRABR-Volume-Backups).
vol
Specifies a volume serial number to which this statement applies. If not specified, ABR examines all volumes processed for the data sets named on this statement. For MOUNT statements, it adds the named volume to the ABR volume list if it is online.
volg
Specifies a volume serial prefix to which this statement applies. If not specified, ABR examines all volumes processed for the data sets named on this statement. For MOUNT statements, it adds the named volumes to the ABR volume list if it is online.
ALLVOL is the default if VOL, VOLG, and STORGRP are not specified, and indicates that ABR is to examine all volumes processed for the data sets specified by this statement.
Default: ALLVOL.