Using wildcard characters to specify object names
In some commands, such as the query commands, you can use wildcard characters to create a pattern-matching expression that specifies more than one object. Using wildcard characters makes it easier to tailor a command to your needs.
About this task
The wildcard characters you use depend on the operating system from which you issue commands. For example, you can use wildcard characters such as an asterisk (*) to match any (0 or more) characters, or you can use a question mark (?) or a percent sign (%) to match exactly one character.
Table 1 provides references to wildcard characters for some operating systems. Use wildcard characters appropriate for your system.
| Operating system | Match any | Match exactly one |
|---|---|---|
| AIX®, Linux®, Windows | * | ? |
| TSO | * | % |
query mgmtclass domain1 * dev*query mgmtclass domain1 policyset1 mc?IBM Storage Protect displays information about management classes with names MC.
Table 2 shows additional examples of using wildcard characters to match any characters.
| Pattern | Matches | Does not match |
|---|---|---|
| ab* | ab, abb, abxxx | a, b, aa, bb |
| ab*rs | abrs, abtrs, abrsrs | ars, aabrs, abrss |
| ab*ef*rs | abefrs, abefghrs | abefr, abers |
Table 3 shows additional examples of using wildcard characters to match exactly one character. The question mark (?) can be replaced by a percent sign (%) if your platform uses that character instead of (?).
| Pattern | Matches | Does not match |
|---|---|---|
| ab? | abc | ab, abab, abzzzz |
| ab?rs | abfrs | abrs, abllrs |
| ab?ef?rs | abdefjrs | abefrs, abdefrs, abefjrs |
| ab??rs | abcdrs, abzzrs | abrs, abjrs, abkkkrs |