ASCII/TEXT

enaio® import-export 10.10 »

Data – ANSI or UTF16 – can be imported and exported in Unicode installations. Field length specifications must adhere to the length difference between ASCII and Unicode characters. In Unicode installations the export is called TEXT export.
Nested register structures cannot be mapped. Tables and the data associated with multi-fields cannot be exported.

Records in TEXT/ASCII format are separated by line breaks. Data are separated with a user-specified separator or by using a fixed field length within a line.

When working with the TEXT/ASCII format using a separator character, this character should not be used in field contents. The export does not check whether there are separators in the fields. If this is the case for any records, the exported records will not match the format description.

The TEXT/ASCII format with fixed field length uses the field length specified in the field definition in enaio® editor. If the content of a field is shorter than specified, '0' characters will be appended to numeric fields, while space characters will be appended to string fields.

For either of these TEXT/ASCII formats, you can select whether the format description should be written to the header, the first line of the file, in a separate file, or not at all.

Once you have selected the format, enter the file name (*.txt) and a directory for the document files via the General parameters dialog (see Export Parameters). A counter will be appended to the file name. If you export the data for multiple object types, one export file per object type will be created.

In the More settings area of the same dialog, you can open the Output options dialog using the Output options button. You can configure the header there.

The default option is Write no header.

If you choose the setting Write a header file, the format description will be written to a header file. This header file can be used for importing data using the 'Data/Document import' automatic action.

If you choose the Write header in every file option, the format description will be written to the first line of the TEXT/ASCII file.

A header can only be written to the file when using TEXT/ASCII format with a separator.

Field Names in Header

The header contains the format description for the exported data. Field names are entered with data type and field length in the order of the data. Every field name is prepended with the name of the object type. Basic parameters and system fields are labeled with '_sys_', and index data field fields with '_usr_'. The data types are 'Char' (C), 'Integer' (N), and 'Date' (D).

Example: Customer_usr_Location C(30)

The object type has the name 'Customer', and the field has the name 'Location'. The field is of data type 'Char' (C) with a maximum length of 30 characters. The field is an index data field.

Header File

A header file has the same name as the TEXT/ASCII file, with the file extension 'cfg', and is written to the same directory as the TEXT/ASCII file. A counter is appended to the name. If you export the data for multiple object types, one header file per object type will be created.

The file begins with the section name [ASIMPEXP]. A list of the exported fields follows. As in the field name in the header, every field name is prepended with the name of the object type. Basic parameter fields are labeled with '_sys_' and other fields with '_usr_'. Data type and field length are also specified.

Example:

[ASIMPEXP]
Feld00 = Kunde_usr_Name C(30)
Feld01 = Kunde_usr_Ort C(30)
Feld02 = Vertrag_usr_Datum D(TT.MM.JJJJ)
Feld03 = Vertrag_usr_Typ C(30)
Feld04 = Vertrag_usr_AuftragNr N(10,0)
Feld05 = Vertrag_sys_Ersteller C(30)
Feld06 = Bilddateiname C(255)

The last field Imagefilename C(255) is added automatically if you export documents. It contains the path and the file name of the exported Document Files.