RC/Compare : Remap tables in a compare strategy
search cancel

RC/Compare : Remap tables in a compare strategy

book

Article ID: 225809

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS

Issue/Introduction

While working on preparing a COMPARE strategy , if a mistake has been made when two objects like two tables have been "mapped" or "matched" to each other incorrectly, it may be necessary , without having to delete the whole strategy, to "Re-Map" the objects in error.

Environment

DB2 for Z/OS

Release : R20

Cause

User error when mapping objects.

Resolution

As an example , consider this Compare strategy. Two tables being compared. 

---------------- RC/M Compare Explode Services ---------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

STRATEGY ===> TBCORPTB             DESCRIPTION  ===>
CREATOR  ===> authid1              SHARE OPTION ===> U (U,Y,N,X,L)
VIEW STRATEGY INFO ===> N          CREATE/DROP OBJECTS ===> N (U,Y,N)
--------------------------------------------------------------------- authid1
SOURCE SSID ===> ssid                   |  TARGET SSID ===> ssid
SOURCE LOC  ===> LOCAL                  |  TARGET LOC  ===> LOCAL
                                        |
    E TY                                | Ob Dep
S   X PE NAME         CREATOR  VERSION  | CH CH NAME         CREATOR  VERSION
_   A T  TBCORPT      authid1           |       TBCORPTB     authid1


The above mapping of TBCORPT with TBCORPTB is deemed incorrect.

In order to correct this problem, the STRATEGY must be updated with a "U" line command.
When on the Compare Explode Services screen use the "D" line command as below on the line that is incorrect.

---------------- RC/M Compare Explode Services ---------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

STRATEGY ===> TBCORPTB             DESCRIPTION  ===>
CREATOR  ===> authid1              SHARE OPTION ===> U (U,Y,N,X,L)
VIEW STRATEGY INFO ===> N          CREATE/DROP OBJECTS ===> N (U,Y,N)
--------------------------------------------------------------------- authid1
SOURCE SSID ===> ssid                   |  TARGET SSID ===> ssid
SOURCE LOC  ===> LOCAL                  |  TARGET LOC  ===> LOCAL
                                        |
    E TY                                | Ob Dep
S   X PE NAME         CREATOR  VERSION  | CH CH NAME         CREATOR  VERSION
D A T  TBCORPT      authid1           |       TBCORPTB     authid1 <<<<<Delete this line!!
After this is deleted .......the line has been removed. 

---------------- RC/M Compare Explode Services ---------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

STRATEGY ===> TBCORPTB             DESCRIPTION  ===>
CREATOR  ===> authid1              SHARE OPTION ===> U (U,Y,N,X,L)
VIEW STRATEGY INFO ===> N          CREATE/DROP OBJECTS ===> N (U,Y,N)
--------------------------------------------------------------------- authid1
SOURCE SSID ===> ssid                   |  TARGET SSID ===> ssid
SOURCE LOC  ===> LOCAL                  |  TARGET LOC  ===> LOCAL
                                        |
    E TY                                | Ob Dep
S   X PE NAME         CREATOR  VERSION  | CH CH NAME         CREATOR  VERSION

then enter the INSERT command in the command line : COMMAND ===>INSERT

This then presents the Primary Object Mapping screen to make the correct selection. Enter the correct selection criteria(object name, creator, a where clause) to narrow down the objects listed.

----------------- RC/M Primary Object Mapping ----------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

STRATEGY ===> TBCORPTB        DESCRIPTION  ===>
CREATOR  ===> authid1         SHARE OPTION ===> U (U,Y,N,X,L)
--------------------------------------------------------------------- BASLU02
OBJECT      ===> T  (SG,DB,TS,T,I,V,S,A,TG,SQ,PR) REFRESH    ===> N

SOURCE SSID => ssid                     | TARGET SSID => ssid
SOURCE LOC  => LOCAL                    | TARGET LOC  => LOCAL
NAME        => *                   >    | NAME        => *                   >
CREATOR     => authid1   >              | CREATOR     => authid1   >
WHERE       => N                        | WHERE       => N
                                        |
OP  OBJ# TABLE              CREATOR     | MAP#  TABLE              CREATOR
__     1 TBCORPT           authid1     | _____ TBCORPT           authid1
__     2 TBCORPTB           authid1     | _____ TBCORPTB           authid1
__     3 TBEMP             authid1     | _____ TBEMP             authid1
*********** BOTTOM OF DATA ************ | ********** BOTTOM OF DATA ***********
                                        |
                                        |
Src Cmds: RC/Query jump commands          Trg Cmds: RC/Query jump or Map nbr
Press ENTER to process Query commands     Enter END to process mapped objects
When the list displays the objects required on the SOURCE and TARGET side use the MAP# to make the appropriate selection:

In the example below, table TBCORPT is mapped to table TBEMP using MAP# 1.
----------------- RC/M Primary Object Mapping ----------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

STRATEGY ===> TBCORPTB        DESCRIPTION  ===>
CREATOR  ===> authid1         SHARE OPTION ===> U (U,Y,N,X,L)
--------------------------------------------------------------------- authid1
OBJECT      ===> T  (SG,DB,TS,T,I,V,S,A,TG,SQ,PR) REFRESH    ===> N

SOURCE SSID => ssid                     | TARGET SSID => ssid
SOURCE LOC  => LOCAL                    | TARGET LOC  => LOCAL
NAME        => *                   >    | NAME        => *                   >
CREATOR     => authid1   >              | CREATOR     => authid1   >
WHERE       => N                        | WHERE       => N
                                        |
OP  OBJ# TABLE              CREATOR     | MAP#  TABLE              CREATOR
_     1 TBCORPT           authid1     | _____ TBCORPT           authid1
__     2 TBCORPTB           authid1     | _____ TBCORPTB           authid1
__     3 TBEMP             authid1     | 1____ TBEMP             authid1 <<<<Mapping table TBEMP with TBCORPT using MAP# 1
*********** BOTTOM OF DATA ************ | ********** BOTTOM OF DATA ***********
                                        |
                                        |
Src Cmds: RC/Query jump commands          Trg Cmds: RC/Query jump or Map nbr
Press ENTER to process Query commands     Enter END to process mapped objects
Enter and PF3 back to the Strategy screen.

---------------- RC/M Compare Explode Services ---------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

STRATEGY ===> TBCORPTB             DESCRIPTION  ===>
CREATOR  ===> authid1              SHARE OPTION ===> U (U,Y,N,X,L)
VIEW STRATEGY INFO ===> N          CREATE/DROP OBJECTS ===> N (U,Y,N)
--------------------------------------------------------------------- authid1
SOURCE SSID ===> ssid                   |  TARGET SSID ===> ssid
SOURCE LOC  ===> LOCAL                  |  TARGET LOC  ===> LOCAL
                                        |
    E TY                                | Ob Dep
S   X PE NAME         CREATOR  VERSION  | CH CH NAME         CREATOR  VERSION
_   A T  TBCORPT     |       TBEMP       authid1
******************************* BOTTOM OF DATA ********************************
Having done that, the mapping is now the desired result and the strategy can be saved ready for analysis. 

At this point also, as a way to do a pre-check of the compare strategy, the COMPARE command can be used to get a report of the intended comparison that the product will do before the analysis job is submitted.
This may indicate other compare problems relating to mapping of dependant objects like indexes that should point the user to problems with the RULESET or MASKSET in use.

When updating the STRATEGY as before enter the COMPARE command in the command field: COMMAND ===> COMPARE

See knowledge base article:

RC/Migrator: How can I see the anticipated result of a RC/Compare strategy without running an analysis?

Additional Information

Primary Object Mapping