.
contact contact

Eloquence import/export format

 
.
  A common file format is used by the hp260exp, dbexport and dbimport utility programs. All data (fields) are saved as a text. This makes it possible to use a text editor (such as vi) or common UNIX tools like cut, grep or sed to evaluate or operate on the data.

  • A separate file is created for each dataset. The name is database.set.exp (for example: "SAD.03.exp"). An automatic data set or an empty data set is ignored.

  • Each line specifies a record. Empty lines are ignored. A line feed (0x0A) character is used a line separator (as usual with UNIX text files). With Windows NT CR/LF (0x0D 0x0A) may be used as a line separator as well.

  • Lines starting with a hash sign (#) are not considered to contain data but additional information for dbimport.

  • Data fields are separated by a comma (,) (this can be configured with recent Eloquence revisions). If there are less fields in a line than in the database, the missing fileds are initialized with standard values (zero or spaces).

  • Numeric fields must start with "+", "-", "." character or a digit.
    For example: -1, 123.56, .5, 0

  • String fields are enclosed in double quotes. A quote or a backslash character must be "escaped" with a backslash.

    The following rules apply to a backslash character embedded in the text:

    • If the following character is a octal digit (0 to 7), the following digits are considered an octal value. The octal value must either have three digits or is terminated by a character which is not an octal digit. An overflow is ignored. For example: \000 is a NUL character.

    • Otherwise, the following character is used without further translation.
      For example: '\\' = '\', '\A' = 'A', '\"' = '"'

Single File format

dbexport and dbimport are able to process a "single file format" (specified by the -s command line option) which can hold data for multiple data set. In addition to the data, control lines starting with a hash sign (#) are included in the file.
# DATABASE = <Database name>
# SET <Set number> = <Set name>
This information is used by dbimport to recognize the different data sets.

Please Note: Data sets must be provided in ascending order (depending on the data set number, data set names are not used unless restructure processing).

For example:

# DATABASE = SAD

# SET 03 = PRODUCT
<Data>
...

# SET 04 = LOCATION
<Data>
...

Additional restructure information

In addition to data and separation information, dbexport could also include information on the database structure. This can be used by dbimport to restructure the database depending on field names rather than field position. Control lines start with a hash sign (#).
# SET <Set Number> = <Set Name>
#   <Item Index> <Item Name> <Item Typ>
For example:
# SET 06 = CUSTOMER
#    1 ORDER-NO        X10
#    2 NAME            X30
#    3 ADDRESS         2 X30
#    5 CITY            X16
#    6 STATE           X6
#    7 COUNTRY         X12
#    8 ZIP-CODE        X8
#    9 ORDER-DATE      I
#   10 SHIP-DATE       I
#   11 REGION          X6
#   12 PRODUCT-NO      I
#   13 PRICE           L
#   14 SALESPERSON     X4
<Data>
...
 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:   
  Copyright © 1995-2002 Marxmeier Software AG