RC/Migrator : Migrate data only from tables that contain records and ignore any others.
search cancel

RC/Migrator : Migrate data only from tables that contain records and ignore any others.


Article ID: 276318


Updated On:


RC/Migrator for DB2 for z/OS


A "Data only" migration with RC/Migrator , using a Migration Strategy , selecting only tables that contain records and ignore any others can be used to unload just the existing data from tables where empty tables are to be ignored. . 





DB2 for Z/OS

release : R20


A where  clause can be set to only migrate tables where the CARDF is >= 1 in SYSTABLES

Perform a data only migration to unload only tables containing records while avoiding empty tables.

CAVEAT: RUNSTATS are up to date. 

Create a Migration strategy. 

---------------- RC/M Update Migration Strategy --------------- yy/mm/yy hh:mm

Strategy ===> EMPTY       Description  ===>
Creator  ===> authid     Share Option ===> U (U,Y,N,X,L)   SRC SSID ===> ssid
-----                                                                        --

PRIMARY OBJECT TYPE SPECIFICATION. ( Select one type with 'A' , 'S', or 'E' )
        _ Storage Group
        _ Database
        _ Tablespace
        A Table
        _ Materialized Query Table
        _ Index
        _ View
        _ Synonym/Alias
        _ Trigger
        _ Routine
        _ Sequence

Name ==> TB%                 >  Creator ==> authid   > Where ==> Y TEMP

Select 'A' against the table to
Autobuild.  All primary objects that match the Primary Object Selection field
    criteria are selected for migration.

Place a "Y" in the WHERE field above and enter.

20.0.09  ---------------- SQL Selection Panel --------------- yyyy/mm/yy hh:mm
Command ==>                                                   SCROLL ===> CSR

      Name ==> EMPTY                           Share => Y         Default => N
Description =>                                 Panel  : RMTABLE  View SQL => N
Confirm Replace ==> Y                          Userid : authid
 Where Clause:
 01 AND A.CARDF >= 1 AND A.TYPE = 'T'

The WHERE clause or Extended Query Facility(EQF) above does a catalog search of SYSIBM.SYSTABLES obtaining only tables with a CARDF greater than or equal to one and a type of "T".

Save the strategy.

Start an Analysis of the strategy and in the UPDATE OPTIONS screen, select the "D" option in BND/DAT/STA/SQL/GRNT/RI ==> D

D          Generate data only, no objects.  Utility options can not be
           selected with this option.

So, only unloads and loads are generated, no DDL.