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:
| .-,---. |
V V | |
- The selection characteristics:
- Allocation type (cylinder,
track, block, absolute track, or movable)
- Whether the data set is currently
cataloged or not (using the standard catalog search order)
- Creation date (absolute or
- Whether the data-set-changed
flag is on or off
- Data set organization (SAM,
PAM, PDS, PDSE, BDAM, HFS, EXCP, ISAM, VSAM or zFS)
- 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.
- Number of allocated or used
extents for the entire data set on all the volumes on which it resides
- Number of allocated or used
tracks for the entire data set on all the volumes on which it resides
(data set size)
- 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)
- Last-referenced date (absolute
- Data class for SMS
- Management class for SMS
- Storage class for SMS
- The operator:
- 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
- An argument that qualifies the selection characteristic (schar).
Table 1 summarizes the permissible combinations
of schar, op,
Table 1. BY Keywords
allocation) TRK (track
BLK (block length
ABSTR (absolute track
MOV (movable data sets)
|If MOV is picked, the data sets to
be processed cannot be allocated as any of the following:
- PSU (physical sequential unmovable)
- POU (partitioned organization unmovable)
- DAU (BDAM unmovable)
- ABSTR (absolute tracks)
- ISAM (indexed sequential access method).
COMPRESS command: If MOV is picked, only data sets allocated
as POU cannot be compressed.
YES (or 1)
NO (or 0)
|YES: DFSMSdss processes only multivolume
data sets. NO: DFSMSdss processes only singlevolume data sets.
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.
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.
YES (or 1)
NO (or 0)
|YES: Only currently cataloged data
sets are processed. NO: Only uncataloged data sets are processed.
command: The CATLG filter is valid only when used with an input
volume list (INDD, INDY, LOGINDD, LOGINDY, STORGRP).
command: The CATLG filter is valid only when used with an input volume
list (INDD, INDY, LOGINDD, LOGINDY, STORGRP).
The target data set is tested to determine if it is cataloged or not.
- Data sets cataloged through JCL are not cataloged until the job
step ends. Therefore, when you use the (CATLG,EQ,NO) filter, you should
also use a CREDT or REFDT filter. The value used in the CREDT or REFDT
filter should be for data sets at least two days old: (CREDT,LE,*,-2)
- A data set is considered uncataloged if it is not cataloged in
the standard order of search or if it is cataloged in an unavailable
|[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.
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.
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.
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.
|SAM (all sequential data sets, including
compressed and striped), PAM (partitioned data sets, including PDS
and PDSE), PDS, PDSE, HFS (hierarchical file system data sets), BDAM
(all direct access data sets), ISAM (all indexed sequential 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.
selective characteristic of DSORG can be specified more than once.
|An appropriate SMS class name.
|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).
command: The data set that was dumped determines the number of used
or allocated extents or tracks.
DUMP and COPY commands:
- For non-VSAM data sets:
- If ALLDATA or ALLEXCP is specified, FSIZE is equal to the allocated
tracks, and EXTNT is equal to the allocated extents.
- If ALLDATA or ALLEXCP is not specified, FSIZE is equal to the
used tracks, and EXTNT is equal to the used extents.
Note: A specification
of FSIZE,EQ,0 can be used to select PDSE data sets that have no members
(that is, have no used directory blocks), and a specification of FSIZE,NE,0
can be used to exclude PDSE data sets that have no members.
- For VSAM data sets, FSIZE is always equal to the allocated tracks,
and EXTNT is always equal to the allocated extents.
Logical data set COPY, DUMP, and RESTORE commands:
- FSIZE criteria are applied once for the entire data set on all
volumes that the data set resides on. For logical processing
of HFS files with TYPRUN NORUN, FSIZE equals all of the allocated
space. For logical processing of HFS files without TYPRUN
NORUN, the used space represents the FSIZE unless ALLDATA was specified.
- EXTNT criteria are applied to non-VSAM data sets once for the
data set on all volumes that the data set resides on.
- EXTNT criteria are applied to each VSAM data component on all
volumes that the VSAM data component resides on. If a VSAM data component
is selected by EXTNT filtering, the index component for the cluster
is automatically selected.
Physical data set DUMP and RESTORE commands:
- FSIZE criteria are applied once for each volume being processed
of a non-VSAM or VSAM data set. For HFS data sets, FSIZE equates to
the allocated space, not the space actually used.
- EXTNT criteria are applied once for each volume being processed
of a non-VSAM data set or VSAM data component. If a VSAM data component
residing on a volume is selected by EXTNT filtering, the index component
(if any) residing on the same volume for the cluster is automatically
- FSIZE and EXTNT can be used to select certain volumes of a multivolume
data set without selecting all of the volumes that the data set resides
- For VSAM data sets, EXTNT and FSIZE criteria are applied at the
VSAM component level for the volume being processed only. EXTNT and
FSIZE filtering are performed for both VSAM data and index components;
VSAM index components are not automatically selected if the data component
for the cluster is selected.
- For non-VSAM data sets, EXTNT and FSIZE criteria are applied for
the volume being processed only. For HFS data sets, FSIZE equates
to the allocated space, not the space actually used.
- 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.