Creation of a DDL baseline via a DDL file


The Baseline component can create a baseline on a set of SQL DDL statements.

The DDL file should meet the following criteria:

  • DDL files can be either a sequential, 80-column data set or a member of a partitioned data set (PDS).
  • The DDL statements must appear in columns 1-72. Columns 73-80 are ignored.
  • The DDL commands in columns 1-72 are free format.
  • If multiple DDL commands appear in the file, they can be separated by semicolons.

Important

The DDL statements can be separated by a character other than the semicolon if the --#SET TERMINATOR value control statement is inserted into the DDL file. The --#SET TERMINATOR statement is the convention that is used by the IBM DSNTEP2 sample dynamic SQL program and SPUFI.

The Baseline component uses the pound sign (#) as the value. The value can be any character except a blank, comma (,), double quotation mark ('), single quotation mark ('), left parenthesis [(], right parenthesis [)], or an underscore (_).

  • Comments in a DDL file are ignored by Baseline. Comments begin with two dashes (--) and continue until the end of the line. No other comment characters are recognized.

Important

The --#SET TERMINATOR statement is not treated as a comment.

The baseline profile that is used for a DDL baseline cannot contain scope rules. In other words, you cannot use a baseline profile that is used to create a catalog baseline to create a DDL baseline. The reverse is also true. You cannot use a baseline profile that is used to create a DDL baseline to create a catalog baseline. The scope of the DDL baseline is all of the objects in the DDL file or the migrate-type worklist.

Important

You must specify nonprintable and nonviewable characters, such as null and control characters, in limit keys, view text, trigger text, or check constraint text in an external hexadecimal format. For more information, see Nonprintable-or-nonviewable-characters.

 

CREATE DATABASE DBACM001
   BUFFERPOOL BP0 ;

CREATE TABLESPACE TSACM001
   IN DBACM001
   BUFFERPOOL BP0 ;

CREATE TABLE ADDRESS
   (PHONE  CHAR(12) NOT NULL,
    STREET CHAR(25) NOT NULL,
    CITY   CHAR(15) NOT NULL,
    STATE  CHAR(2)  NOT NULL,
    ZIP CHAR(10) NOT NULL)
   IN DBACM001.TSACM001 ;

CREATE TABLE NAMES
   (FNAME  CHAR(15) NOT NULL WITH DEFAULT,
   MNAME CHAR(10) NOT NULL,
    LNAME  CHAR(20) NOT NULL,
    PHONE  CHAR(12) NOT NULL)
   IN DBACM001.TSACM001 ;

 

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