PMDF System Manager's Guide


Previous Next Contents Index


crdb

pmdf crdb is a utility used to create and update PMDF database files.

Syntax

pmdf crdb input-file-spec output-database-spec

Command Qualifiers Defaults
-append -noappend
-count -count
-delete -nodelete
-dump See text
-duplicates -noduplicates
-exception_file=file-spec -noexception_file
-huge_records -huge_records
-long_records -nolong_records
-quoted -noquoted
-remove -noremove
-statistics -statistics
-strip_colons -nostrip_colons

restrictions

None.

prompts

Input file: input-file-spec
Output database: output-database-spec

Parameters

input-file-spec

A text file containing the entries to be placed into the database. Each line of the text file must correspond to a single entry.

output-database-spec

The initial name string of the file to which to write the database; the database consists of several files named output-database-spec.*.

Description

pmdf crdb is a utility to create and or update PMDF database files. pmdf crdb simply converts a plain text file into PMDF database records and from them either creates a new database or updates the records in an existing database.

When run from the root account pmdf crdb will set the ownership of the database it creates to the pmdf account.

In general, each line of the input file must consist of a left hand side and a right hand side. The two sides are separated by one or more spaces or tabs. The left hand side is limited to 32 characters in a short database (the default variety), 80 characters in a long database, or 252 characters in a huge database. The right hand side is limited to 80 characters in a short database, 256 characters in a long database, or 1024 characters in a huge database. Spaces and tabs may not appear in the left hand side (but see the description of the -quoted qualifier below).

The format of the input file is described in the sections describing each particular PMDF database. For instance, the format of the input file for an alias database is described in Section 3.1.2; the format of the input file for the domain database (rewrite rule database) is described in Section 2.2.9; the format of the input file for the address reversal database is described in Section 3.3.2.


Command Qualifiers

-append

-noappend (default)

When the default, -noappend, qualifier is in effect, a new database is created, overwriting any old database of that name. Use the -append qualifier to instruct PMDF to instead add the new records to an existing database.

-count (default)

-nocount

Controls whether or not a count is output after each group of 100 input lines are processed.

-delete

-nodelete (default)

Use the -delete qualifier to instruct PMDF to delete the specified records from an existing database. The input file should contain one key value per line for the entries to delete. The data portion of the line is ignored. If the database was created with -duplicate, for multiple entries with the same key value, only the first entry is deleted.

-dump

pmdf crdb -dump is a synonym for pmdf dumpdb. It is used to dump an existing database to a flat text file -- or to stdout if no output file is specified. The parameters are interpreted as the input database specification, and optionally a flat text file to which to write the output. No other qualifiers are valid when -dump is specified.

-duplicates

-noduplicates (default)

Controls whether or not duplicate records are allowed in the output files. Currently duplicate records are of use only in the domain database (rewrite rules database) and databases associated with the directory channel.

-exception_file=file-spec

-noexception_file (default)

pmdf crdb may encounter records that cannot be loaded into the database. This usually means that these records had keys (left hand sides) that were duplicates of other keys previously encountered in the input file. These exception records can optionally be written to a separate output file for later examination; the -exceptions_file qualifier controls the writing of this file. Note that the lines in this file are not plain text; they are formatted as database entries.

-long_records

-nolong_records (default)

-huge_records

-nohuge_records

These qualifiers control the size of the output records. By default left hand sides are limited to 32 characters and right hand sides are limited to 80 characters. If -long_records is specified, the limits are changed to 80 and 256, respectively. If -huge_records is specified, the limits are changed to 252 and 1024, respectively. Currently, -huge_records databases are supported only for the alias database.

-quoted

-noquoted (default)

This qualifier controls the handling of quotes. Normally pmdf crdb pays no particular attention to double quotes. If -quoted is specified, pmdf crdb matches up double quotes in the process of determining the break between the left and right hand sides of each input line. Spaces and tabs are then allowed in the left hand side if they are within a matching pair of quotes. This is useful for certain kinds of databases, where spaces may form a part of database keys. Note: The quotes are not removed unless the -remove qualifier is also specified.

-remove

-noremove (default)

This qualifier controls the removal of quotes. If pmdf crdb is instructed to pay attention to quotes, the quotes are normally retained. If -remove is specified, pmdf crdb removes the outermost set of quotes from the left hand side of each input line. Spaces and tabs are then allowed in the left hand side if they are within a matching pair of quotes. This is useful for certain kinds of databases, where spaces may form a part of database keys. Note: -remove is ignored if -quoted is not in effect.

-statistics (default)

-nostatistics

Controls whether or not some simple statistics are output by pmdf crdb, including the number of entries (lines) converted, the number of exceptions (usually duplicate records) detected, and the number of entries that could not be converted because they were too long to fit in the output database. -nostatistics suppresses output of this information.

-strip_colons

-nostrip_colons (default)

The -strip_colons qualifier instructs pmdf crdb to strip a trailing colon from the right end of the left hand side of each line it reads from the input file. This is useful for turning alias file entries into an alias database.

EXAMPLES


# pmdf crdb -long_records /pmdf/table/aliases.txt PMDF_ALIAS_DATABASE
      

The above example shows UNIX commands that may be used to create an alias database with "long" record entries.


C:\>pmdf crdb -long_records C:\pmdf\table\aliases.txt PMDF_ALIAS_DATABASE
      

The above example shows NT commands that may be used to create an alias database with "long" record entries.


Previous Next Contents Index