Generating CREATE DDL


When DDL has been captured during extract for Db2 objects, File-AID/RDX generates DDL that matches the source objects and puts it in the load JCL (member Db2CREAT in the control card PDSE). This DDL is used to create new target objects during load. When building DDL, File-AID/RDX uses certain information from the extracted tables as follows:

  • Column information is used unaltered. File-AID/RDX does not create Distinct types (UDTs). If the source UDT does not exist in the target system, File-AID/RDX will create the columns using only the UDT’s built-in data type.
  • FIELDPROC and VALIDPROC information is used in the CREATE DDL unaltered.
  • Primary key information is used unaltered. File-AID/RDX generates an index that reflects the primary key.
  • The table name is modified to reflect the table name specified on the Target Environment screen.
  • The IN statement is modified to reflect the database and tablespace specified on the Target Environment screen.
  • EDITPROC and OBID statements are not used to build the CREATE DDL.

File-AID/RDX saves foreign key information from extracted tables and adds it to new tables using ALTER statements after the new tables have been created.

For all indexes for all tables in the extract file, File-AID/RDX uses certain information as follows:

  • The index creator name is modified to match the table creator name specified on the Target Environment screen.
  • Column and cluster information is used unaltered.
  • Partition information is used if the tablespace associated with the new table is partitioned. Otherwise, partition information is ignored.
  • The ON statement is modified to reflect the table name specified on the Target Environment screen.
  • USING information is used unaltered.
  • USING information is not used to build the CREATE DDL.

After File-AID/RDX successfully creates all the tables and indexes, it executes ALTER statements to add referential constraints. Constraints are added only to tables that are part of the load. Constraints added to tables within the load are used unaltered.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*