Table Label, Column Label, Primary Key and Foreign Key dropped when have specified that unpaired dependent target objects should not be dropped in RC/Compare
search cancel

Table Label, Column Label, Primary Key and Foreign Key dropped when have specified that unpaired dependent target objects should not be dropped in RC/Compare

book

Article ID: 52681

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS RC/Migrator for DB2 for z/OS

Issue/Introduction

This Automap Compare strategy has been created using the online panels and specifying the EXCLUDE option of 'N'.
This should tell RC/Compare for Db2 for z/OS (RCC) to not exclude (drop) unpaired target dependent objects.

Perform the same test using the Batch Automap program, with an Explode Option (EXPOPT) of 'A', and this produces the same results.

The source DDL file that is being compared contains the CREATE DDL for a Table but no dependent DDL.

When the Compare Strategy is analyzed, the Change Analysis Report shows that the Primary Key and Foreign Key
have been DELETED (dropped). Dependent objects such as Indexes and Views have not been dropped as is expected.

--  ------------ Unique Constraint Changes ---------------
--  Attribute   Status        Value
--  ---------   -----------   ----+----1----+----2----+----3--
--  NAME        Currently:    (PRIMARY KEY)
--              Changed To:   (DELETED)
--  ------------ Foreign Key Changes ---------------------
--  Attribute   Status        Value
--  ---------   -----------   ----+----1----+----2----+----3--
--  RELNAME     Currently:    xxxxxx
--              Changed To:   (DELETED)

Why are dependent objects such as Table Label, Column Labels, Primary Key and Foreign Key dropped,
when we have instructed RC/Compare to include all dependent target objects?

Resolution

The online EXCLUDE option and batch Explode Option, relate specifically to Objects.

Online - EXCLUDE=N tells RC/Compare to not exclude (drop) unpaired dependent target objects.
Batch - EXPOPT (A) tells RC/Compare to include all dependent target objects.

However, with regards to Foreign Keys, Primary Keys and Labels, these are object attributes and so they are not affected by these two options.
Their comparison is controlled by the RULESET. If you do not want these attributes to be compared and so keep their target values, then the
relevant RULESET attribute should be set to 'N'.

An additional note with regards to the online EXCLUDE option when creating an Automap strategy using the online panels.

RMC2J R11.5  ----------- RC/M Create Compare Strategy -------
COMMAND ===>
  
Strategy ===> xxxxxxxx        Description  ===> EXPLODE/EXCLU
Creator  ===> USERID1         Share Option ===> U (U,Y,N,X,L)
-------------------------------------------------------------
SOURCE SQL SPECIFICATION:
Dataset  ===>
Member   ===>                    Volser        ===>
  
  
TARGET SUBSYSTEM SPECIFICATION:
SSID     ===>                    Location      ===> LOCAL
  
RULE SET SPECIFICATION:          MASK SPECIFICATION:
Rule Set ===> @DEFAULT           Mask Set ===> @DEFAULT
Creator  ===>                    Creator  ===>
   
EXCLUDE SPECIFICATION:
Exclude (DROP) unpaired target dependents  ===> Y (Y,N)

When an Exclude option of 'Y' is specified, this sets the Explode Option to 'X'.
When an Exclude option of 'N' is specified, this sets the Explode Option to 'A'.