3. Specifying compare masks

If you need to account for different naming conventions between the objects you are comparing or overwrite certain attributes, specify masks. This step is optional.

You can define a mask either in a data set or in a table in the Change Management repository. Storing masks in a data set makes copying mask files easy. Storing masks in a table makes them easy to share, manage, and recover.

Tip: If you want to mask the schema and the owner, you must specify masks for both schema and owner, even if the values are the same.

Before you begin

If you plan to define your masks in a table, Change Management must be enabled and the repository tables must be defined as part of the customization process of Db2® Administration Tool.

Procedure

To specify compare masks:
  1. On the DB2 Object Comparison Tool Menu (GOCMENU) panel, specify option 3.
  2. If you want to use a table in the Change Management repository for your masks, complete the following steps. Otherwise, if you want to use a data set for your masks, skip to step 3.
    1. On the Specify Compare Masks (GOC3) panel, specify an owner and name. This name identifies a row in the mask table in the Change Management database. That row contains (or will contain) the masks that you want to use for the comparison operation. You can specify either an existing name to identify an existing row in the mask table or a specify a new name to create a row in the mask table.
      Tip: If the Owner and Name fields are not displayed, Change Management is not enabled. Either enable it or use a data set for your masks (as described in step 3).
      Figure 1. Specify Compare Masks (GOC3) panel
      GOC3 re  --------------------- Specify Compare Masks --------------------------
      Option ===>                                                                   
                                                                                    
                                                                                    
      Mask Table Entry:                                                             
        Owner . .  MYID     >        (? to look up)                             
        Name  . .  MYMASK         >  (? to look up)                             
      Data Set:                                                                     
        Mask DSN  . .                                                               
      Options:                                                                      
        Edit Mask . .  YES (Yes/No) 
    2. In the Edit Mask field, specify whether you want to edit this set of masks, and press Enter. If the values that you specified in the Owner and Name fields do not identify an existing set of masks, you must specify YES.

      One of the following panels is displayed:

      • If you specified the name of an existing set of masks and NO for Edit Mask, the DB2 Object Comparison Tool Menu (GOCMENU) panel is displayed. Notice that for step 3 - Specify compare masks, the Specification Status field shows Mask specified. You have completed specifying your compare masks. You can skip the rest of this procedure and continue the process of comparing Db2 objects.
      • If you specified the name of an existing set of masks and YES for Edit Mask, the Mask Lines (ADB2C2L) panel is displayed. Skip to step 2.f.
      • If you specified a new name for a set of masks, the Insert Mask (ADB2C22) panel is displayed:
        Figure 2. Insert Mask (ADB2C22) panel
          ADB2C22 n ---------------- CM - Insert Mask ----------------------------- 12:25
         Command ===>                                                                   
                                                                                        
                                                                                        
         Owner . . . MYID     >   (Optional, default is USERID)                         
         Name  . . . MYMASK    >  (Required, ? to look up)                     
         Comment . .                                             >                      
                                                                                        
                                                                                        
                                                                                        
                                                                                        
    3. Optional: In the comment field, enter a description for this set of masks.
    4. Press Enter to insert a row into the Change Management repository table for this new set of masks.
    5. Press F3 to go to the Mask Lines (ADB2C2L) panel where you can define the masks.
    6. Insert and update lines as needed to define the masks that you want to use for the comparison.

      For example, on the following panel, the TBNAME mask specifies that any table names of TB_TEST are to be translated to TB_PROD for the comparison. (This mask also affects the child masks SYNNAME, ALNAME, and VWNAME.)

      For a complete list of mask names and syntax, see Mask definitions (IBM Db2 Administration Tool for z/OS 13.1.0).

      Figure 3. Mask Lines (ADB2C2L) panel
       ADB2C2L n ----------------- CM - Mask Lines ------------------ Row 1 to 1 of 1 
       Command ===>                                                  Scroll ===> PAGE 
                                                                                      
       Mask lines for mask "MYID"."MYMASK"                                          
       Commands: CANCEL                                                                 
       Line commands:                                                                 
         I - Insert  D - Delete  R - Repeat  M - Move  A - After  B - Before          
        
       Sel Sequence Req Type      From                 To                    Oper.  T 
                  * *   *         *                    *                     *      * 
       --- -------- --- --------- -------------------> --------------------> ------ -                                                                                
      *           1     TBNAME    TB_TEST               TB_PROD                UPDATE   
      *           2     COLNAME   CELLNO                MOBILENO               UPDATE   
      *           3     SINGLECH  _                     +
      *           4     ALNAME    ALS+_TEST             ALS+_PROD                         
       ******************************* END OF DB2 DATA *******************************
                                                                                      
                                                                                      
                                                                                      
    7. Exit back to the DB2 Object Comparison Tool Menu (GOCMENU) panel. Notice that for step 3 - Specify compare masks, the Specification Status field shows Mask specified. You have completed specifying your compare masks. You can skip the rest of this procedure and continue the process of comparing Db2 objects.
  3. If you want to use a data set for your masks, complete the following steps:
    1. On the Specify Compare Masks (GOC3) panel, in the Mask DSN field, specify the name of the data set.

      You can specify an existing data set that already contains masks or a new data set that you want to use for masks. If the specified data set exists, it is reused. Otherwise, it is created.

      The mask data set must adhere to TSO naming conventions and be one of the following types:

      • A fixed-block sequential data set (RECFM=Fx)
      • A member of a partitioned data set with a record length of 80 (LRECL=80)
    2. In the Edit Mask field, specify whether you want to edit the mask data set by using ISPF edit, and press Enter. If the data set is new or does not contain mask definitions, specify YES.

      One of the following panels is displayed:

      • If you specified NO for Edit Mask, the DB2 Object Comparison Tool Menu (GOCMENU) panel is displayed. Notice that for step 3 - Specify compare masks, the Specification Status field shows Mask specified. You have completed specifying your compare masks. You can skip the rest of this procedure and continue the process of comparing Db2 objects.
      • If you specified YES for Edit Mask, the Edit Compare Masks (GOCEDIT) panel is displayed.
    3. On the Edit Compare Masks (GOCEDIT) panel, add and change mask definitions as needed, and issue the SAVE command.

      For a listing of content that is displayed on the Edit Compare Masks (GOCEDIT) panel, see Mask data set.

      For a complete list of mask names and syntax, see Mask definitions (IBM Db2 Administration Tool for z/OS 13.1.0).

    4. When you are done making changes, exit back to the DB2 Object Comparison Tool Menu (GOCMENU) panel. Notice that for step 3 - Specify compare masks, the Specification Status field shows Mask specified.

What to do next

Optionally specify ignore fields or generate a compare batch job.