impexp - Import an Export File

impexp [-a|n] [-bfrstV] dataarea|dataID [exportfilename]

Import an exported database file.

The exported file must include the following characteristics:

  • Each record must end with a carriage return character. You can use cnvexp to insert these characters.

  • The first ten characters of each record in the export file are the name of the file, in uppercase, that the record belongs to. (Because each record has the file name attached to it, a single export file can include records from different files.)

  • Every data field must be represented in the same order as in the data file, and in full length, including leading zeros for numeric data and trailing spaces for alphanumeric data.

  • Signed numeric data must also include the sign in the first character position following the last value digit.

    Program Option Description
    a Overwrite duplicate records. Replaces existing database records with duplicate records in the flat file. If the flat file has multiple occurrences of a record, the last occurrence is the record stored in the database. Overrides the -r option.
    n No overwrite of duplicate records. Does not replace existing database records with duplicate records from the flat file. It ignores the duplicate records in the flat file. Overrides the -r option.
    b Block size if reading tape.
    f

    Fast; do not check for matching records.

    Note: Option -r is required for SQL databases.

    Does not replace existing database records with duplicate records in the flat file. Using this option assumes the -n option and overrides the -r option.

    r Record differences report. Prints duplicate records between the flat file and the database. It does not replace the existing database records with the duplicate flat file records. It does not load any records.
    s

    Set the return code if there are DB or Dup errors. Use this option to stop a multistep job after the impexp step if all new records were not added successfully. The job displays in the Waiting job queue with a status of Needs Recovery. Codes returned are:

    1. Database error

    2. Duplicate record

    3. Both database error and duplicate record error

    t Tape block size; same as -b 10k.
    V Display the version number of this utility.

    Description of summary headers:

    • Processed: Records in export file.

    • Added: Records added.

    • Duplicate: Records that have the same keys as existing records.

    • Match: Duplicates that exactly match existing records.

    • Changed: Duplicates overwritten by export file.

    • Bad: Records not imported because of an error.

    At the command line, specify the information above.

    - or -

  1. From the Database Administration menu, choose Data Export/Import.

  2. From the Data Export/Import menu, choose Import An Export File.

  3. Specify or select the following data.

    Option Description
    DataArea/DataID Data area or data ID to import an export file into.
    exportfilename Export file name to load the data from.
    I/O Options Optional. Display the output or redirect it to a file.
    Note: Date, time, user name, type, utility name, and key field activities of this utility are logged in the $LAWDIR/system/secadmin.log file.