IBM Data Set Commander for z/OS User's Guide Ver 8.1

Patterns

In a number of commands and fields where a name can be entered, Data Set Commander also accepts a pattern. For example, in MSL, when a line command is entered as a main command, a pattern can be used instead of a member name, so that the command acts on all names matching the pattern. A pattern contains one or more wildcard characters, which allow it to match more than one name. The wildcard characters are the percent sign ("%") and the asterisk "*". Any character in the data in the same position as a percent sign is considered to match it. (A blank in the data is not considered to match.) Any number of characters from the position of the asterisk to the right are considered to match the asterisk. The asterisk can be in any position. Trailing blanks match the asterisk. In addition, the underscore character ("_") is used to indicate a blank space. (Although blank spaces cannot appear in some fields, such as the member name field in an MSL, they can appear in the RENAME column of an MSL, where the feedback messages appear, and in load module attribute fields.)

The following examples illustrate how patterns work:

Table 1. Pattern matching definitions
Pattern Contents of Field Match Reason
DEMO%0

DEMO10
DEMOZ0
DEMO
DEMO

YES
YES
NO
NO



Nothing in position 5
Last character not "0"

AB%D*

ABCD
ABCDE
AB1D234
AB
ABC
ABBB

YES
YES
YES
NO
NO
NO



  
Nothing in position 3
Position 4 not "D"
Position 4 not "D"

AB%

ABC
AB1
AB
ABCD
BBB

YES
YES
NO
NO
NO


  
Nothing in position 3
More than three characters
Position 1 not "A"

* ABCDEFG YES Matches any name
% A YES Matches any single-character name
_ (empty) YES  
A_C

A C
ABC

YES
NO


Position 2 not blank

AB_

AB
ABC

YES
NO


Position 3 not blank

A*C

ABC
AC
BC
AB

YES
YES
NO
NO



Does not start with "A"
Does not start with "C"

*A*B

AB
$ABC
ABEND
A23B4
CCBD
ZAREA

YES
YES
YES
YES
NO
NO





No "A" in string preceding "B"
No "B" in string following "A"



Feedback