SELECT and EXCLUDE Statements for COPY and MOVE


SELECT and EXCLUDE statement syntax

SELECT|EXCLUDE


DSN=filter|CATDSN=filter|DD=ddn|ALLDSN|FROM(CYL=ccccc,TRK=tttt)
,TO(CYL=ccccc,TRK=tttt)





,DATA=ALL



,DSNENQ=NONE


,DSORG=([DA][EF][IS][PO][PS][UM][UN])






,NVOL=vol|(vol,…,vol)







,TRK=nnnnn|CYL=nnnnn

SELECT and EXCLUDE statements for COPY and MOVE

The SELECT statement selects the data sets that are copied or moved. FDRCOPY scans the VTOC of each input volume for data sets that match the parameters on a SELECT statement. Data sets may be selected by fully-qualified data set name or by using generic data set name selection (DSN=), or by copying a data set name from a DD statement (DD=). All data sets on an input volume may be selected (ALLDSN). If the SELECT statement specifies the VOL= operand, the named volumes are automatically processed as input volumes.

Data sets may also be selected from the system catalogs by fully-qualified name or using a generic filter (CATDSN=). The volumes found in the catalog entries are automatically processed as input volumes, and the data set name found in the catalogs is selected from their VTOCs.

Important

The volumes processed due to CATDSN= are also compared to other SELECT statements in the FDRCOPY step; if you have other SELECT statements without either VOL= or TAPEDD= this may cause data sets to be selected unexpectedly.

It is also possible to copy specific tracks or ranges of tracks or cylinders to the identical locations on the output volume (FROM/TO). This operation is a copy regardless of the COPY or MOVE statement, since these tracks are not associated with any particular data set, and no data on the input DASD volume is disturbed. However, no check is made to see if the tracks being overlaid on the output DASD volume belong to any particular data set, so this function should be used with care. Absolute track operations can be disabled by an option in the FDR Global Options.

The EXCLUDE statement prevents certain data sets from being copied or moved. The data sets to be excluded may be specified by fully-qualified name or by using generic data set name selection (DSN=) or copied from a DD statement (DD=). The EXCLUDE statement may be used to exclude particular data sets that would be selected by a more-encompassing SELECT statement. The EXCLUDE statement with the FROM/TO operands may be used to exclude particular tracks from the copy or move of a data set. Since SELECT and EXCLUDE statements are scanned in the order they are input, EXCLUDE statements should usually precede SELECT statements.

SELECT and EXCLUDE statements apply to all input DASD volumes unless TAPEDD= or VOL= parameters are specified.

Copying VSAM files

FDRCOPY supports copying VSAM clusters by cluster name using the DSN=, CATDSN=, or ALLDSN operands. All components of a cluster on a given input volume are copied. This includes Alternate Indexes (AIXs) and key range components. The component names are reported by FDRCOPY followed by the base cluster name. All of the associated VVR information from the VVDS is copied to the VVDS of the output DASD volume. See:

for other considerations for copying or moving VSAM.

SELECT and EXCLUDE statement operands

DSN=

filter

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 input volumes. For example:

DSN=USER1.JCL.CNTL

DSN=**LIST

DSN=PROD++.**.LIB*

DSN= does not have any special support for selecting GDGs, you can use CATDSN= to select relative generation number for a GDG.

CATDSN=

filter

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= parameter (if there are no DISKx DD statements pointing to those volumes, FDRCOPY will dynamically allocate and process them as input volumes). 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.

Examples:

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 FDRCOPY 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.

Warning

Depending on the filter specified, CATDSN= may need to search many catalogs. CATDSN= is required if MAXTASKS= greater than one is specified on the COPY/MOVE statement.

DD=

ddn

Specifies that a data set name is to be taken from a DD statement. The value of DD= is the ddname of a JCL statement. Using this option lets you specify a non-standard data set name or a Generation Data Group (GDG) relative generation (CATDSN= also lets you select relative generations). For example:

SELECT DD=DD1

//DD1 DD DSN=A.B.C(0),DISP=SHR

Important

Although DD= copies the data set name from the DD statement, it does not use the volume pointed to by that DD statement. The data set is searched for only on the volumes being processed; the volume containing the data set must be among them. You could have a DISKx DD statement pointing to a data set and use DD=DISKx, so that the volume containing the data set is automatically included.

ALLDSN

Specifies that FDRCOPY is to process all the data sets on the volumes specified. DSN=** is equivalent to ALLDSN.

FROM

TO

(CYL=ccccc,TRK=tttt)

Identifies a range of track addresses for an absolute track copy. Absolute track statements can be mixed with SELECT statements for data sets. The FROM and TO operands must appear on the same input record, and cannot be continued. FROM/TO cannot be used on an EXCLUDE statement. Absolute track operations can be disabled by the NOABSTRK option in the FDRGlobal Options (Security-Options).

The cylinder (CYL=) and track (TRK=) addresses are in decimal, relative to zero. Leading zeros can be omitted. For example, valid specification on a 3390-3, which has 3339 cylinders and 15 tracks per cylinder, are CYL=0,TRK=0 to CYL=3338,TRK=14. The FROM address must be lower than or equal to the TO address.

If the FROM track (TRK=) is omitted, zero is assumed. If the TO track (TRK=) is omitted, the last track of the cylinder is assumed. So, if you specify only cylinder numbers (for example, FROM(CYL=5),TO(CYL=7)) all tracks in those cylinders are processed.

Important

DSN=, CATDSN=, DD=, ALLDSN and FROM/TO are mutually exclusive. One and only one of these operands must be specified on each SELECT or EXCLUDE card.

BLKF=

nn

Selected PS and PO data sets are to be reblocked during the copy. For more information, see BLKF=.

Default: Data sets are not reblocked unless BLKF= was specified on the COPY/MOVE statement. The copy fails if the input data set has blocks larger than the track size of the output DASD volume.

CATALOG=

MCATALOG=

catn

Specifies the name of a user catalog (CATALOG=) or alternate master catalog (MCATALOG=) to search when CATDSN= is specified. See Selecting Data Sets From the Catalog for details.

Important

This catalog is not used when cataloging or recataloging moved or copied data sets; the standard IBM catalog search order is used to locate the catalog entry to be created or updated.

Default: The catalog search starts with the active master catalog. User catalogs are searched if their assigned aliases match the CATDSN=filter.

CATLIMITGDG=

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)).

CATNEWN=

catn

Copy the selected data set with a new name. This is similar to the NEWNAME= operand, documented below, except that a catalog LOCATE is done on the name, and the result is saved as the new name. This is particularly useful if the new name is a GDG and you want to use a relative generation number, for example, CATNEWN=PROD.PAYROLL.MASTER(+1).

DATA=

ALL

Specifies that FDRCOPY copy/move 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. DATA=ALL should be used if the last block pointer of certain data sets is invalid. DATA=ALL should not be used with RLSE or %FREE=.

DATACLAS=

MGMTCLAS=

STORCLAS=

NULLDATACLAS

NULLMGMTCLAS

NULLSTORCLAS

Specifies the SMS classes to be associated with the output data set, overriding the original classes of the input data set (if any). The storage class and management class ACS routines are passed the appropriate class, and they may override them. The data class ACS routine is not invoked, and the data class characteristics are not used during allocation or copy.

NULLxxxxCLAS

Changes the specified class to null (not specified).

Default: The original SMS classes of the input data set (if any) is used for the output data set if it is allocated as SMS-managed. For a non SMS-managed input data set, null classes are set.

If the storage class ACS routine assigns a storage class to the output data set or accepts the class passed, the data set is allocated as SMS-managed, and the SMS Storage Group ACS routine may be invoked to determine the actual target volume. If the Storage Class ACS routine returns a null (blank) storage class name, the data set is allocated as non SMS-managed and the FDRCOPY rules listed in Target Volume Selection for volume selection must select a non SMS-managed target volume.

DSNENQ=

NONE

The data set enqueue is not done for the selected data sets. This can be used to override the DSNENQ= operand on the COPY/MOVE statement for certain data sets that you know will probably be enqueued by another task.

Default: Enqueue option is determined by the DSNENQ option specified on the COPY or MOVE statement.

DSORG=

Specifies that this SELECT/EXCLUDE statement is to apply only to data sets whose data set organization matches one of the DSORG values specified. If more than one DSORG= option is specified, they must be enclosed in parentheses.

Valid DSORG= values are:

DA

BDAM

EF

VSAM

PO

Partitioned

PS

Sequential

UM

Unmovable

UN

Undefined (NONE)

Important

DSORG=PO selects both PO and POE data sets.

NEWNAME=

dsn

Copy or moves the selected data set with a new name. NEWNAME= should only be used when the SELECT statement selects only a single data set. If the new name ends in a GDG relative generation number, use the CATNEWN= operand instead.

NEWGROUP=

grp

Copy or move the selected data sets using a new group name. The characters specified replace the beginning of the input data set name. Care should be taken when periods are used that index levels are not incorrectly changed. The new names are validated for conformance to IBM naming standards.

Example:

SELECT DSN=ABC**,NEWG=XYZ

Any data sets copied are renamed to start with characters XYZ.

NEWINDEX=

idx

Copy or move the selected data sets using a new name formed by adding or replacing one or more index levels in the original name; replacement index levels do not have to be the same length as the original indexes they replace. In the simplest case, each index level specified in NEWI= is used in place of the corresponding index in the original name. Any remaining index levels at the end of the name are copied unchanged. This can easily be used to change the first indexes of the name.

For example, if the input data set is A.B.C.D:

NEWI=D results in D.B.C.D (1st index replaced)

NEWI=DD.E results in DD.E.C.D (first 2 indexes replaced)

If a period is specified without any preceding characters, one original index level is copied from the input data set name to the output. This allows you to easily modify indexes in the middle of the name.

For example, if the input data set is A.B.C.D,

NEWI=..E results in A.B.E.D (3rd index replaced)

NEWI=FF...G results in FF.B.C.G (1st & 4th IDXs replaced)

If + is specified before a new index level, that new index is inserted into the output data set name at that point. If ++ precedes the new index, it is added to the end of the name. If – is specified, the next input index level is dropped from (not copied to) the output name.

For example, if the input data set is A.B.C.D,

NEWI=+F results in F.A.B.C.D (new 1st index added)

NEWI=..+F results in A.B.F.C.E (new 3rd index added)

NEWI=++F results in A.B.C.D.F (new last index added)

NEWI=..- results in A.B.D (3rd index dropped)

NEWI=Q.-.+E results in Q.C.E.D (combination)

Important

Except for the ++ option, every period in the NEWI= mask corresponds to a period (one index level) in the original (input) data set name. The resulting new name is checked to insure it meets IBM standards.


If the NEWI= value ends in a GDG relative generation number, for example, NEWI=..NEWMAST(--2), that relative number is added to the end of the “newname”, and a LOCATE done to get the proper absolute generation number.

NEWI= is a convenient way to rename every input data set, while using some index levels from the original name and replacing other indexes or adding new indexes.

NEWDD=

ddn

Specifies the name of a DD statement from which the new name of the output data set is obtained. NEWDD= should only be used when the SELECT statement selects only a single data set.

Important

NEWN=, NEWG=, NEWI=, and NEWDD= are mutually exclusive. If none of them are specified, the data set is copied or moved under its original name. One of these parameters is required when copying VSAM clusters since clusters cannot be copied under their original name; however, a new name is not required when moving VSAM clusters (see VSAM Support).

NEWTOCYL=

NEWTOTRK=

For an absolute track copy (FROM/TO), specifies the starting cylinder and track (in decimal) where the tracks should be copied. Both operands should be specified. The first track specified by the FROM operand is copied to this location, and other tracks selected by this SELECT are copied relative to that location.

If omitted, the tracks are copied to their original locations.

For example, to move 10 tracks from cylinder 10 track 5 on VOL001 to cylinder 20 track 0 on VOL002, specify:

SELECT FROM(CYL=10,TRK=5),TO(CYL=10,TRK=14),
NEWTOCYL=20,NEWTOTRK=0

NOCAT

RECAT

Overrides the cataloging options (NOCAT, RECAT, or default) specified on the COPY/MOVE statement, for the data sets selected by this statement. See NOCAT.

NVOL=

vol

Specifies the volume serials of output DASD volumes to which data sets selected by this statement are to be copied/moved. You may specify:

A single specific volume serial, for example: NVOL=ABC123

A list of specific volume serials, enclosed in parentheses, for example: NVOL=(TSO001,TSO002,TSO003)

A group of volumes by placing an asterisk at the end of the VOLSER prefix, for example: NVOL=TSO*

A combination of specific and group, for example: NVOL=(TSO*,PROD*,ABC001)

All online DASD volumes may be selected by: NVOL=*

A list of online target volumes matching your specification is generated by scanning all DASD UCBs in the system UCB chains; but you cannot predict the order of the volume serials in the list. If you specify volume serials or groups that are not online, they are ignored and no error message results.

However, if the first or only specification is a specific volume serial, it is chosen as the first target volume, with other volumes placed after it in UCB chain order.

If you are restoring a multi-volume data set (non-VSAM or SMS-managed VSAM), the volume sequence number of the piece of the data set being allocated is used to select a specification from your list. For example, if NVOL=(A,B,C), the second piece of the data set goes to volume B. If that specification is a group, the first volume in the UCB chain matching that group is tried. If the allocation is unsuccessful (such as insufficient free space), then other volumes in the NVOL= list are tried as described above.

The first target volume is checked to see if an output data set already exists there. If so, it copies over the existing allocation (unless PRESTAGE was specified). If not, it attempts to allocate the output data set on that volume. If the allocation fails, it is retried on successive volumes in the list until it succeeds or until it fails on 64 volumes. If the list contains several DASD device types, “like” volumes (same type as the data set being copied) are tried first, then unlike devices.

For multi-volume data sets, a target volume is bypassed if a piece of the data set already exists there but is not the right piece, so that it does not attempt to copy the third volume of a data set on top of the first volume. When it finds a target volume in the list that does not contain a piece of the data set, it is allocated.

Specifying multiple volume serial numbers or a volume group allows you to copy data sets in one pass even when no one volume has available space to contain them all; they are spread across many of the target volumes.

Default: The output volume is selected by rules defined in Target Volume Selection.

On a system with SMS active, NVOL= may be ignored if the data set does not exist on the volume specified and the data set is SMS-managed (see STORCLAS=).

Important

If an allocation is attempted on several volumes from your NVOL= list but it fails on all of them, the message printed will usually show the allocation failure codes from the first volume only; failure codes from other volumes are not displayed and may be different.

PRESTAGE

Specifies that selected data sets are not copied if the output data set already exists on the first target output volume. This may be used to avoid copying data sets that have already been copied.

Default: Copy preallocated data sets, overlaying the existing contents of those data sets, unless PRESTAGE was specified on the COPY/MOVE statement.

PRTALIAS

When used on a SELECT statement with CATDSN= PRTALIAS displays all of the alias names and user catalogs that were searched. This is effective only when the data set name mask you provided forces CATDSN= to start in the master catalog and search one or more alias catalogs. If the non-mask characters at the beginning of the mask are sufficient to cause CATDSN= to begin its search in a user catalog, PRTALIAS is ignored.

RLSE

%FREE=

RLSE

Specifies that all of the unused space in the output Physical Sequential (PS) and PO (partitioned) data sets is released.

%FREE=nn

Specifies a percentage (nn%) of the PS and PO data sets to be left free after the copy. However, the data sets are never made larger than their original size. “nn” may range from zero (0), which frees all of the free space (same as RLSE), to 99, which attempts to leave the data sets with 99% free space.

Space is released only from data sets allocated by the copy; space is actually released by recalculating the required space during the allocation.

Default: The output data sets are allocated the same size as the input data sets (unless overridden by TRK=/CYL= on the SELECT statement or by RLSE/%FREE= on the COPY/MOVE statement).

TAPEDD=

x

Specifies the same character as specified in a DISKx DD statement. If this operand is present, then this SELECT/EXCLUDE only applies to data sets on the input DASD volume specified by the DISKx DD statement.

TAPEDD= might be used when multiple DISKx DD statements point to the same input volume but the data sets are to be output to different output volumes as specified by TAPEx DD statements or NVOL= operands.

TRK=

CYL=

nnnnn

If the data set selected by this SELECT statement must be allocated, CYL= or TRK= specifies the number of cylinders or tracks to be allocated to the data set. On PS or PO files when DATA=ALL was not specified, this value should be at least equal to the used portion of the data set. On all other types of files and when DATA=ALL is specified, this value should be equal to or greater than the original size of the file. For VSAM clusters, modifies the size of the base data component only. If the space is too small for the non-VSAM data set being copied, the data set is automatically be extended. Maximum value that can be specified is 65535.

Default: Use the original size of the data set unless RLSE or %FREE= was specified.

VOL=

vol

Specifies the input DASD volume serials to which this SELECT or EXCLUDE statement applies. It may specify a single serial (for example, VOL=ABC123) or a group of volumes all starting with the same prefix (for example, VOL=ABC*). If there are online DASD volumes matching the VOL= value that are not pointed to by DISKx DD statements in the FDRCOPY step, FDRCOPY automatically dynamically allocates them and process them as input volumes. If specified on a SELECT CATDSN= statement, only data sets cataloged to the specified volumes are chosen.

Default: If neither TAPEDD= or VOL= are specified, the SELECT and EXCLUDE statements apply to all input volumes and SELECT CATDSN= selects data sets regardless of the cataloged volume serial.

Important

TAPEDD= and VOL= are mutually exclusive. One and only one of these operands may be specified.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*