Previous Topic Next topic Print topic


DDL Processor

The DDL Processor processes SQL DDL statements using one of the following methods:
  • Transforming DB2 for z/OS syntax DDL statements to DB2 LUW format
  • Processing the DDL statements unchanged

You can run the DDL Processor from the HCO for DB2 LUW user interface, or (Windows platforms only) using the mfhco ddl command.

Downloading Source DDL

DDL source files on the mainframe should be downloaded and converted to standard ANSI text files. The maximum input length per record accepted by the DDL processor is 80 bytes.

Note: If non-blank characters exist in columns 73 through 80, you must change maximum column to process to be 72 or they are treated as part of the DDL source statement. See mfhco ddl command for more details.

Downloading Data to Load Tables

There are two tools in Host Compatibility Option to help you load test data exported from tables located on the mainframe:

  • The Export Data tool
  • The Import Data tool

Using the DDL Processor to Load Data

You can also use the DDL processor to load or update data into tables by placing one or more of the following DML statements in the same file as DDL statements:

  • INSERT
  • UPDATE
  • DELETE
  • COMMIT

This is a convenient way to load test data into tables.

Statements cannot contain any host variables and you cannot use quotes ( " ) around literals. You must use apostrophes ( ' ). You should also issue a COMMIT before you try to insert data into a table if it was created within the same unit of work. For example:

-- Create Available Product table
 CREATE TABLE MF.PRODUCT
  (PROD_ID  CHAR(04)    NOT NULL
  ,PROD_DESC  CHAR(40)    NOT NULL WITH DEFAULT
  ,VERSION  CHAR(6)    NOT NULL WITH DEFAULT
  ,PRIMARY KEY (PROD_ID) )
  IN DSB8G210.CISC0001
 ;
 COMMIT
 ;

 -- Sample data for Product table

 INSERT INTO MF.PRODUCT (PROD_ID ,PROD_DESC ,VERSION )
 VALUES ('SR02' ,'Host Compatibility Option ' ,'2.0.01' )
Previous Topic Next topic Print topic