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:
Pattern | Contents of Field | Match | Reason |
---|---|---|---|
DEMO%0 | DEMO10 |
YES |
|
AB%D* | ABCD |
YES |
|
AB% | ABC |
YES |
|
* | ABCDEFG | YES | Matches any name |
% | A | YES | Matches any single-character name |
_ | (empty) | YES | |
A_C | A C |
YES |
|
AB_ | AB |
YES |
|
A*C | ABC |
YES |
|
*A*B | AB |
YES |
|