z/OS DFSMSdfp Utilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SELECT Statement

z/OS DFSMSdfp Utilities
SC23-6864-00

The SELECT statement specifies members to be selected from input data sets to be altered, copied, loaded, or unloaded to an output data set. This statement is also used to rename or replace selected members on the output data set. More than one SELECT statement may be used in succession, in which case the second and subsequent statements are treated as a continuation of the first.

The SELECT statement must follow either a COPY statement, a COPYGRP statement, a COPYMOD statement, or one or more INDD statements. A SELECT statement cannot appear with an EXCLUDE statement in the same copy, unload, or load step, and it cannot be used with a compress-in-place function. When both the INDD and OUTDD statements are pointing to the same data set, the members in the SELECT statement are replaced or copied to a new name within the same data set, based on the replace and newname options.

When a selected member is found on an input data set, it is not searched for again in this copy step.

Each member name on a SELECT statement must be unique.

A selected member will not replace an identically named member in the output data set unless the replace option is specified on either the data set or member level. In addition, unless the replace option is specified, a renamed member will not replace a member in the output data set that has the same new name as the renamed member.

The syntax of the SELECT statement is:

Label Statement Parameters

[label]

SELECT

MEMBER=({name1|
           (name1,newname1[,R])|
           (name1,,R)}
          [,{
name2|
           (name2,newname2[,R])|
           (name2,,R)}][,...])

where:
MEMBER=({name|(name, newname[,R])|(name,,R)} [,...])
specifies the members to be selected from the input data set.

To rename a member, specify the old name of the member, followed by the new name and, optionally, the R (replace) parameter. This group must then be enclosed in parentheses.If member name pattern masking is being used to select the members from the input data set, then the rename option is not supported.

To replace a member, specify the name of the member and the R parameter. Two commas must separate the R from the member name, and the group must be enclosed in parentheses.

When any option within parentheses is specified anywhere in the MEMBER field, the entire field, exclusive of the MEMBER keyword, must be enclosed in a second set of parentheses.

The values that can be coded are:
name or filter pattern mask
identifies a specific member to be processed. All names and new names specified in one copy step must be unique. You cannot duplicate either old names, or new names, or both, under any circumstances. You cannot rename A to B and B to C, because B will appear twice. You cannot specify a name that is more than eight characters in length.

When the COPYGROUP statement is used, the member name can either identify a specific member to be processed, or a member name pattern mask where multiple names may meet the name pattern criteria. Member name pattern masking cannot be used with newname. See SELECT Member name filter pattern masking for rules and examples of member name pattern masking.

newname
specifies a new name for a selected member. Member names can consist of A - Z, 0 - 9, or $ # @ _ } \, or {, and cannot be more than eight characters in length. The member is copied, unloaded, or loaded to the output data set using its new name. If the name already appears on the output partitioned data set or PDSE, the member is not copied unless replacement is also specified. Newname cannot be specified with ALTERMOD.
R
specifies that the input member is to replace any identically named member that exists on the output data set. If the input member's name is identical to any output member's alias name, the name will refer to the new member and not the old member.

R may not be coded with ALTERMOD or COPYGRP.

The control statement operation and keyword parameters can be abbreviated to their first letters; for example, SELECT can be abbreviated to S and MEMBER can be abbreviated to M.

Related reading: For a description of replacing members, see Replacing Members in a Data Set.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014