Record label
Every record begins with the record label. It consists of a sequence of data elements starting at record position 0; it holds general processing information and positions that characterise the function and content of the record. The record label is mandatory.
The data elements have a fixed length and are identified by their position within the record label. In the format description the data elements are described in ascending order of their character position.
All data elements must be filled. Where no information can be given for an individual data element, a blank is generally used, unless a different rule has been laid down for that element.
The record label is a uniform 24 characters long across all formats.
Structure
- Positions 0–4: sequential number; decimal; right-aligned; leading zeros
- Position 5:
n(constant) - Positions 6–9:
M2.0(constant) - Position 10:
1(constant) - Position 11:
0(constant) - Positions 12–16:
00024(constant) - Position 17: character set of the file, see below
- Positions 18–22: five blanks (kept free for later definitions)
- Position 23:
h(constant)
Every record begins with the record label. In place of the field designation stands the
character sequence "### ". Positions 0–4 hold the sequential number of the record
within the exchange unit. The field terminator consists of the two ASCII characters 13
and 10, that is CR LF.
Example:
"### 00001nM2.01000024 h" + CRLF
Character set#
Position 17 names the character set the file is written in. MAB2 leaves positions 17 to 22 of the record label unused; SBC takes one of them.
| Position 17 | Character set |
|---|---|
| blank | CP850 (DOS) — the character set used so far |
w |
Windows-1252 |
u |
UTF-8 |
A blank therefore still means CP850: files following the previous definition remain
valid, nothing has to be changed. Further letters — for instance x for an encoding
named elsewhere — are reserved for later extensions.
The same rule applies to positions 18 to 22: they stay blank for now, and a blank there
will always mean the previous behaviour. Later definitions can thus be added without
touching the length of the record label — that length is stated in the label itself, as
00024.
A file with an unknown value at position 17 should be rejected rather than read according to the previous definition: wrongly decoded umlauts only show up once they are already in the database.