bldibmddl - Build Data Definition Language

bldibmddl [-UqaoRDTIGECKBWXSV] [-u DbLoginName] [-p Password] DataArea [SystemCode] [FileName ...]

The bldibmddl utility generates SQL statements for creating or deleting selected tables, indexes, and stored procedures. The utility can operate on specific tables, all tables in a system code, or all tables in a product line. It creates Data Definition Language (DDL) text according to the highest possible version with the given compatibility. The definitions that generate the SQL statements reside in the Lawson dictionary and are maintained by Lawson utilities.

The bldibmddl utility can be run to create an output file containing the SQL statements, or it can be run in update mode to implement changes to the SQL database objects.

This utility is securable and if a security violation is encountered, access must be granted to the token through LSA. To grant a user access, see the Resources and Security Administration Guide.

Program Option Description
U

Update; create objects in the database.

If you use the -U option, the generated SQL statements update the IBM DB2 database definition. Otherwise, SQL statements are generated but not executed. If you are working with critical data, do not use the update mode without first examining the DDL. Instead, the preferred method is to direct the output to a file that you can examine, edit if necessary, and issue the command to the database through a SQL utility.

q Quiet mode. Do not echo DDL to stdout.
a

Positioning mode. Start at dataarea [systemcode] filename.

If you use the -a option, you can start the utility at a specific system code or file.

o Offline Mode. Do not connect to the database
R

Rebuild mode. Drop objects before creating.

If you do not specify either the -R or -D option, output is generated to create tables and indexes.

D

Drop objects only.

If you do not specify either the -R or -D option, output is generated to create tables and indexes.

T

Affect table objects only.

If you do not specify the -T or -I option, output is generated for both tables and indexes.

I

Affect index objects only.

If you do not specify the -T or -I option, output is generated for both tables and indexes. If you do not specify either the -R or -D option, output is generated to create tables and indexes.

G Affect trigger objects only.
B

Affect non-native objects only.

Cannot be used with -U. Requires -T or -I. The default is -BTI.

E

Affect text indexes only.

Requires the -I option.

C Rebuild the conditional indexes.
K

Create an additional index without a descending column for the primary key constraint. Use this option if you need to replicate an IBM DB2 table that has a descending column.

Requires the -I option. Cannot be used with the -E option.

Running bldibmddl with the -K option allows for creation of a primary key to enable tables that have a descending column in the primary index to be replicated. The -K option generates an additional index without a descending column for the primary key constraint. The intent of the -K option is to get around the IBM DB2 limitation of not allowing primary key constraints on indexes with one or more descending columns. Use bldibmddl with -UIK after you run a dbreorg (or dbcreate) to restore the optional primary key indexes which are dropped in the dbreorg process.

The bldibmddl utility, when used without the -K option, also drops the optional primary key indexes. Run the utility with -UIK to restore the optional primary keys after the tables are rebuilt with either dbcreate or bldibmddl.

W

Affect native view objects only.

Cannot be used with -U or any other object type option.

X

Affect non-native view objects only.

Cannot be used with -U or any other object type option.

S Generate DDL into files by system codes: dbname . systemcode .ddl.
V Print the utility version.