# empdbld

    EMPDBLD(1)                                                          EMPDBLD(1)

    NAME
           empdbld - load EMPRESS databases

    SYNOPSIS
           empdbld [-c] [-d [count]] [-r rejectfile] database specfile datafile

    DESCRIPTION
           This  command  loads  fixed  format data into EMPRESS databases.  It is
           able to load data from a single input file into multiple databases  and
           tables.

           The  specification  file  "specfile"  is used to describe how the input
           record fields are to be mapped to databases, tables and atributes.   It
           must  conform to the syntax given in the EMPRESS Administrator's Guide.
           Each input record will cause a single record to be inserted  into  each
           table specified.  If a table contains an attribute not mentioned in the
           specification file, it will be assigned a "null" value for  all  tuples
           loaded into the table.

           Data  is  read  from the "datafile" and loaded.  If the datafile is "-"
           data is read from standard input.  The input data must be fixed format,
           fixed  length,  ASCII  data.  The database named on the command line is
           the default database to be loaded.  The "specfile" may cause data to be
           loaded to databases other than the default database.

           You must have EMPRESS "insert" privilege on the tables to be loaded.

           On  completion,  the  command  prints  a  count of the records read and
           records reject to standard output.

           Pressing interrupt will stop the program.

           -c        Runs a check on the data without  loading  it.   The  program
                     will check the format and datatypes of the data.  This option
                     does not provide a check for duplicate tuples.

           -d        Causes the program to read the specification  file  and  data
                     file,  and  print each data value with the attribute to which
                     it is mapped.  It is intended to provide a  visual  check  on
                     whether  the  specification  file correctly maps input record
                     fields to  attributes.   All  data  translation  clauses  are
                     ignored.   The  optional  count specifies the number of input
                     records to process.  Using a count of 2 is usually sufficient
                     to  test  both  the record length specification and the field
                     mapping specifications.  If no count  is  specified  all  the
                     records  are  read  and  all  the  data printed.  Results are
                     printed to standard output.  The -d  option  implies  the  -c
                     option; all loading is suppressed so that the database is not
                     affected, and data type errors will be printed  if  they  are
                     found.

           -r        Writes records that fail (or would fail given -c or -d) to be
                     loaded to  the  rejectfile.   After  modification  to  remove
                     errors, the data in the rejectfile may be re-loaded using the
                     same specification file.

    FILES
           EMPRESS database files

    SEE ALSO
           empimpt(1)

           Empress: Database Administrator's Guide

    DIAGNOSTICS
           Error diagnostics are printed if no database ,  specification  file  or
           data  file  is  specified, if the database is not in EMPRESS format, if
           the specification file is not in the  format  defined  in  the  EMPRESS
           Administrator's Guide, or if execution errors are detected.

           An  error occurs if any data to be loaded is incompatible with the data
           type of the attribute for which it is intended or if excess  duplicates
           would  be  inserted  for  an  indexed  attribute.   The input record is
           rejected and the error reported to standard error.  Records  that  fail
           to be loaded may be optionally directed to a reject file.

           If the input specifications could cause a null value to be inserted for
           an attribute defined as "not null", the program prints  a  message  and
           stops before loading commences.

    HISTORY
           Written  by  Empress  Software  Inc..   All material is copyrighted and
           licensed.  Use on non-licensed CPUs is prohibited.

    Empress 8.62                 Empress Software Inc.                  EMPDBLD(1)