Using wildcard characters in the object name specification


When you use the BMC AMI Copy dynamic allocation feature, you can simplify the specification of multiple objects by using the wildcard characters * (asterisk) and % (percent) in space names in COPY, COPY IMAGECOPY, QUIESCE, and RECALL statements.

These wildcard characters represent a sequence of zero or more characters and are equivalent to the % character defined for the Db2 LIKE predicate. You can also use the special wildcard DB2CATALOG with BMC AMI Copy commands to ensure the correct processing of the Db2 catalog and directory spaces and their indexes. (For more information, see Using-the-DB2CATALOG-wildcard.)

BMC AMI Copy also provides the EXCLUDE option to allow you to exclude specified objects from a wildcard expansion (For more information, see Excluding-specified-spaces-from-a-wildcard-specification.)

The wildcard feature can greatly reduce the amount of input control data that needs to be prepared for execution by allowing groups of objects to be processed based solely on their naming formats. When BMC AMI Copy encounters a wildcard pattern in the SYSIN data set, it identifies all of the objects matching the pattern as defined by the Db2 pattern matching rules. Each object is then processed as if a separate request for the object had appeared in the SYSIN data set. For example, the following statement specifies the copying of all table spaces within database ABC:

COPY TABLESPACE ABC.* ...options

The set of table space names processed by this copy command will be the same as the set of table space names returned by the following query:

SELECT NAME
  FROM SYSIBM.SYSTABLESPACE
  WHERE DBNAME = 'ABC' AND NAME LIKE '%';

Important

BMC AMI Copy ignores trailing blanks when evaluating wildcards.

When BMC AMI Copy expands a wildcard specification (* or %) to determine all of the objects implied, it orders the resulting spaces alphanumerically. Each space name is in the form databaseName.spaceName. Partitioned table spaces are expanded and the results are ordered by partition number. BMC AMI Copy otherwise processes the statement in the same way that it processes multiple copy statements.

If a database you want to copy is a mix of partitioned and nonpartitioned table spaces, you might be able to use the DSNUM PART option and wildcard characters to simplify the specification instead of specifying DSNUM ALL (the default) for each type of table space. For example, the following statement provides copies of all table spaces in the database ABC:

COPY TABLESPACE ABC.* DSNUM PART ....more options

Partitioned table spaces in the database are copied by partition while nonpartitioned table spaces are copied by table space.

This section contains the following topics:

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*