(Adlib) Tagged

An Adlib Tagged or just Tagged file (.dat) contains the data (in ASCII or UTF-8 encoding) from every record of a certain database table or dataset in readable form, but contains no index information. Its main purpose is allowing the exchange of Collections database tables between different versions of Collections applications.

File layout

Each line begins with a tag (field label) of two characters, then a space, followed by the field contents. The tag begins with a percentage sign or a letter, and further consists of letters, digits or an underscore. Collections and Designer make a distinction between upper case and lower case letters in tags. The field content is allowed to contain line breaks, but each new line should then start on the fourth position in the line (so the software won't think the first two characters of the continuing contents are a tag). The field occurrence is closed when the next line starts with a field tag or record separator. The order of fields is not important. Per record, a field may be repeated a maximum of 32767 times, and a record may contain a maximum of 32767 fields. Therefore, both the field contents and the record contents are variable. Repetitions of a field must be on consecutive lines. With repeated fields, the tag name is required in front of every field occurrence. There is no maximum record length.

The tag %0 is reserved for the record number (the primary reference: "priref"). The priref must be an integer and may not occur more than once in each record. If several records have the same record number, only the last one will appear in the database table. If the priref in the data record is 0, Designer will allocate the next free record number to that record.

Between the records (the record separator), and at the end of the file, there is a line that only contains two asterisks at the first two positions: two asterisks at the beginning of a line actually mark the end of a record. (There should be no double asterisk on the first line.) The number of records may not exceed 2,147,483,647.

Example:

%0 134
%1 Brown’s Print Shop
%2 Brown, J.
%3 DE236JX
%4 Derby
A1 131 Bonsall Avenue
BE The house was built in 1910,
   while it was destroyed by fire in 1923.
BE The house was rebuilt in 1925.
A3 England
A4 01510 - 752582
A5 PRINTERS
A9 Ron
**

Conversion

A Tagged file can be imported, and the Axiell software can export to such a file. Most third-party database programs cannot read this type of file directly.
If the tag names in the exchange file are the same as the tag names in the database table to which you want to import, you don’t have to enter the full tag mapping for the import job. You just enter ** and ** once, as source/destination tag pair. The software will then use the tag names from the exchange file, when importing.

For exporting to a Tagged file, the tags from the database table will automatically be copied.