Wildcards and Pattern Matching with spdsclean

Some spdsclean options, such as -domains, use wildcards and pattern matching functions. The spdsclean utility uses the following wildcard and pattern matching rules:
  • Character strings must match the domain name from the libnames.parm parameter file. The match is not case sensitive.
  • In the search pattern, the period (.) and question mark (?) characters find a wildcard match to any single character in a domain name in the libnames.parm parameter file.
  • The asterisk (*) character terminates the pattern and finds wildcard matches to all remaining characters in the domain name in the libnames.parm parameter file.
For example, the -domains pattern ?test* matches the domains ATEST1, ATEST123, ATESTXYZ, CTEST1, and so on, from a libnames.parm parameter file. The -domains pattern test* matches only the domain name TEST from the libnames.parm parameter file.
Note: When you use wildcard characters in a -domains pattern, follow the rules for your command shell (such as ksh) to ensure that these characters are passed to the spdsclean command. For example, a ksh command shell user needs to enclose the wildcard pattern in double quotation marks. The double quotation marks ensure that the wildcard pattern matching occurs relative to the spdsclean command. Here is an example:
spdsclean -domains "?test*" 
You can also disable command shell globbing for the execution of the spdsclean command.
Last updated: February 3, 2017