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.
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.
Table 1. Wildcard Characters by Environment
Environment | Match-Any | Match-Exactly-One |
---|---|---|
AIX, UNIX, HP-UX, DOS, OS/2, SunOS, Windows | * | ? |
AS/400, CMS, TSO | * | % |
For example, if you want to query all the management classes whose names begin with DEV in all the policy sets in DOMAIN1, and your system uses an asterisk as the match-any character, you can enter:
query mgmtclass domain1 * dev*
However, if your system uses a question mark as the match-exactly-one character, and you want to query the management classes in POLICYSET1 in DOMAIN1 you can enter:
query mgmtclass domain1 policyset1 mc?
TSM displays information about management classes with names MC.
Table 2 shows additional examples 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 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 (?).
Table 3. Match-Exactly-One Character
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 |