The DTD Generate utility creates document type definition (DTD) and schema files for use with the Loader package.
Notes:
- Run the dtdgen utility. For information about configuring the Loader package refer to the topic, Configuring Loader package utilities.
- Filenames specified as parameters for this utility can be preceded by relative or absolute paths.
Parameter values
- -dbname
Name of the target database
This is the database name as displayed in the relational database directory (WRKRDBDIRE)
- -dbuser
Name of the user connecting to the database
This is usually the same as the instance user name
- -dbpwd
- Password for the user connecting to the database
- -outfile
- Name of the output DTD file
- -infile
- Name of an input file containing a database-table name on each line
- -tablenames
- Names of tables, separated by commas
- -customizer
- Name of the customizer property. The default file is:
If you have configured your instance to use the toolbox driver, then use the Toolbox_GENWCSDTD_Customizer customizer file provided for the toolbox driver. You must also specify the hostname for the -dbname parameter. The following is an example of invoking the dtdgen.sh script:
./dtdgen.sh -dbname MY.HOSTNAME.CA -dbuser instance -dbpwd mypass -outfile /path/out.dtd method sqlimport -customizer Toolbox_GENWCSDTD_Customizer -infile /path/file.xml
The customizer property file can be specified as shown in the following example:
- -customizer WC_installdir/my_directory/file_name.properties
- -customizer WC_installdir/my_directory/file_name
- -customizer WC_userdir/my_directory/file_name.properties
- -customizer WC_userdir/my_directory/file_name
If this file exists in the current directory, the same file can be specified as shown in the following example:
- -customizer file_name.properties
If this file exists in a directory specified in the classpath system-environment variable, the same file can be specified as shown in the following example:
- -customizer file_name
where:
my_directory is a user defined directory and file_name is the name of the property file that you want to use.
Name of the customizer property file to be used. The default file is:
DB2ConnectionCustomizer.properties.The customizer property file can be specified as shown in the following example:
-customizer WC_installdir\my_directory\file_name.properties
If this file exists in a directory specified in the classpath system-environment variable, the same file can be specified as shown in the following example:
-customizer file_name
where, my_directory is a user defined directory and file_name is the name of the property file that you want to use.
- -schemaname
- Name of the target database schema. This parameter is optional. If this parameter is not specified when running the utility, the utility looks for a name=value pair in the customizer property file that specifies the value of SchemaName. If this pair is present in the property file, the utility uses the value specified. If neither a command-line nor a property-file specification for this parameter exists, the utility defaults to the name of the database user.