Subset Data for iSeries V7R1 (DB2/400)

You can use the CA TDM Datamaker UI to subset data for DB2/400. The Subset Production Data section in the CA TDM wiki includes the generic high-level process that explains how you can use Datamaker to subset your data for different databases. This generic process covers the following steps:
tdm481
You can use the CA TDM Datamaker UI to subset data for DB2/400. The Subset Production Data section in the CA TDM wiki includes the generic high-level process that explains how you can use Datamaker to subset your data for different databases. This generic process covers the following steps:
  • Establish Database Connection
  • Select Data to Subset
  • Define Relationships
  • Save Extract Definitions
  • Generate Scripts to Move Data
  • Prepare Subset Schema
  • Running Extracts and Imports
This process is also applicable for DB2/400. However, some of the options in the Generate Scripts to Move Data section change for DB2/400. Therefore, we recommend you to review the following steps to understand how to use those options in the context of DB2/400:
  1. Access the GT Subset interface from the Datamaker UI.
  2. Select your source schema, driving (parent) table, and create and execute the SQL statement as appropriate.
  3. Select the
    Extract&Load
    option from the drop-down list next to SQL and click the Database Actions icon (forward arrow).
    The
    Database Actions - Build SQL Insert Script
    dialog opens.
  4. Click the
    Extract Details
    tab, enter the action name, select the target database, and perform one of the following actions as applicable:
    • CTAS (Create Table As Select)
      For CTAS subset, only target database instance should be present without having database tables. The generated script out of the subset creates the required database tables into the target database schema and inserts the subset data from source database into the target database instance.
      Select the 
      Create Table As Select
       option and click the
      Extract Tables
      tab.
    • Non-CTAS
      For non-CTAS subset, the database instance containing the same database schema as in source should be present without any data. The generated script out of the subset inserts the subset data from source database into the target database instance.
      Click the 
      Extract Tables
       tab.
  5. Select the transformation map created for the subset and click
    Generate
    .
    A subset insert SQL script is generated. 
    You need to execute the SQL insert query from the Datamaker SQL window of the target DB instance. The query extracts the data from the source database tables, performs the subset based on the transformation map, and inserts the subset data into the target database tables. You perform this action as part of the Running Extracts and Imports section.