Filtering by data set characteristics
After DFSMSdss has tentatively selected data sets by applying INCLUDE and EXCLUDE criteria, you can apply BY criteria to further restrict the data sets finally chosen. You can, for example, use BY to select data sets by creation date, storage class, and a wide variety of other criteria. The BY keyword takes this form:
- Where
- Represents
- schar
- The selection characteristics:
- Keyword
- Criteria
- ALLOC
- Allocation type (cylinder, track, block, absolute track, or movable)
- CATLG
- Whether the data set is currently cataloged or not (using the standard catalog search order)
- CREDT
- Creation date (absolute or relative)
- DSCHA
- Whether the data-set-changed flag is on or off
- DSORG
- Data set organization (SAM, PAM, PDS, PDSE, BDAM, HFS, EXCP, VSAM or zFS)
- EXPDT
- Expiration date (absolute or relative). Data sets without expiration dates explicitly assigned to them are considered to have an expiration date of zero. If you wish to exclude these data sets from expiration date processing, you must specifically exclude them in your filtering list, that is, BY EXPDT NE 0000000.
- EXTNT
- Number of allocated or used extents for the entire data set on all the volumes on which it resides
- FSIZE
- Number of allocated or used tracks for the entire data set on all the volumes on which it resides (data set size)
- MULTI
- Whether the data set is singlevolume or multivolume (Single volume data sets that have been allocated but have never been opened and are not cataloged may be selected as multivolume)
- REFDT
- Last-referenced date (absolute or relative)
- DATACLAS
- Data class for SMS
- MGMTCLAS
- Management class for SMS
- STORCLAS
- Storage class for SMS
- op
- The operator:
- Operator
- Meaning
- EQ or =
- Equal to
- LE or <=
- Less than or equal to
- LT or <
- Less than
- GT or >
- Greater than
- GE or >=
- Greater than or equal to
- NE or ¬=
- Not equal to
- arg
- An argument that qualifies the selection characteristic (schar).
schar | op | arg | Notes |
---|---|---|---|
ALLOC | EQ NE | CYL (cylinder
allocation) TRK (track allocation) BLK (block length allocation) ABSTR (absolute track allocation) MOV (movable data sets) |
If MOV is picked, the data sets to be processed cannot be allocated
as any of the following:
COMPRESS command: If MOV is picked, only data sets allocated as POU cannot be compressed. |
MULTI | EQ | YES (or 1)
NO (or 0) |
YES: DFSMSdss processes only multivolume
data sets. NO: DFSMSdss processes only singlevolume data sets. DEFRAG command: If a data set’s volume sequence number is greater than one in the VTOC, DFSMSdss assumes it is multivolume. If this sequence number is 1, DFSMSdss assumes it is a single volume data set. COMPRESS command: Because DFSMSdss assumes the data set is single volume, you do not need to specify MULTI. Note: Single volume data sets that
have been allocated but have never been opened and are not cataloged
may be selected as multivolume.
|
CATLG | EQ | YES (or 1)
NO (or 0) |
YES: Only currently cataloged data
sets are processed. NO: Only uncataloged data sets are processed. DUMP command: The CATLG filter is valid only when used with an input volume list (INDD, INDY, LOGINDD, LOGINDY, STORGRP). COPY command: The CATLG filter is valid only when used with an input volume list (INDD, INDY, LOGINDD, LOGINDY, STORGRP). RESTORE command: The target data set is tested to determine if it is cataloged or not. Note:
|
CREDT
EXPDT REFDT |
LT
GT EQ NE GE LE |
[yy]yyddd(,n): 4-digit (or 2-digit)
year and 3-digit day, modified by an optional 1-digit to 4-digit positive
or negative number of days, n. The year values range from 1900 through
9999. For example, 1998100 (or 98100) is the 100th day of 1998 and
2000001 (or 00001) is the first day of 2000. *(,n): Current date (run date), modified by an optional 1-digit to 4-digit positive or negative number of days, n. For example, *,-5 is five days before this job is run. NEVER: Never-expire date (valid only for EXPDT). A never-expire data set has an expiration date in its VTOC entry of 99365, 99366, or 99999. |
The preferred form of a date has
a 4-digit year (yyyyddd). When you specify a date with a 4-digit year
other than a date of all zeros, the smallest valid date before modification
is 1900001. When you specify a date with the 2-digit year format (yyddd),
a yy of 00 through 49 indicates years 2000 through 2049; a yy of 50
through 99 indicates years 1950 through 1999. You must use the 4-digit
year format if you wish to filter on years 1900 through 1949 or on
years higher than 2049. CREDT and EXPDT: For a multivolume data set, the date from its first volume’s VTOC is used for checking. EXPDT: When you specify a date of 99365 or 1999365, you are specifying the last day of 1999. When you specify EXPDT with NEVER, 99366, 1999366, 99999, 1999999, or 9999999, you ask DFSMSdss to look for all valid forms of never-expire dates (including 99365 in a data set’s VTOC entry). Therefore, BY(EXPDT,EQ,1999365) selects no data sets. DFSMSdss considers the valid forms of never-expire dates as equal to each other and as greater than all other dates. A never-expire date cannot be modified and cannot be specified with the GT operator. REFDT: For a multivolume data set, the latest date from all its VTOCs is used for checking. RELEASE and DEFRAG commands: The date in the VTOC of the volume being processed is used for filtering both single- and multivolume data sets. |
DSCHA | EQ
NE |
YES (or 1)
NO (or 0) |
For a multivolume data set, the value used for checking is 1 if any of the indicators from all of its VTOCs is 1. Otherwise, the value is 0. |
DSORG | EQ
NE |
SAM (all sequential data sets, including compressed and striped), PAM (partitioned data sets, including PDS and PDSE), PDS, PDSE, BDAM (all direct access data sets), VSAM (includes all VSAM data set types), zFS (zFS data sets),EXCP (applies to data sets not allocated as any of the listed organizations and not accessed by using any of the listed access methods) | COMPRESS command: Because DFSMSdss assumes data set organization,
you do not need to specify it. The selective characteristic of DSORG can be specified more than once. |
DATACLAS
MGMTCLAS STORCLAS |
EQ
NE |
An appropriate SMS class name. | |
EXTNT
FSIZE |
LT
GT EQ NE GE LE |
nnnnnnnn (1-digit to 8-digit decimal number, from 0 to 99999999) | nnnnnnnn is the number of used or allocated
extents (EXTNT) or used or allocated tracks (FSIZE). RESTORE command: The data set that was dumped determines the number of used or allocated extents or tracks. DUMP and COPY commands:
Logical data set COPY, DUMP, and RESTORE commands:
Physical data set DUMP and RESTORE commands:
DEFRAG commands:
|
- When multiple arguments are specified for an NE operation, DFSMSdss selects only those data sets not matching any of the arguments.
- When multiple arguments are specified for an EQ operation, DFSMSdss selects those data sets matching any of the arguments.
- BY criteria do not apply for the CONVERTV or COPYDUMP commands.