Cargo-IMP message specifications
The following screenshot shows a part of a typical Cargo-IMP message specification. Note: Based on Cargo-IMP - 31st Edition 2011.
(1) Segment Standard Message Identification.
(2) Standard Message Identifier. In this case, it will be STR.
(3) and (4): Message Type Version Number. In this case 2.
Hierarchical data structure of message specifications
The components of a message are grouped by levels, where
Level 1 is the Text Element Level.
Level 2 is the Data Group Level.
Level 3 is the Data Element Level.
Applied to our example message specification STR:
1. Standard Message Identification (Level 1, we will also call this level 'segment').
1.1 Standard Message Identifier (Level 3).
1.3 Message Type Version Number (Level 3).
Status of text elements, data groups, and data elements

We will model the status with values 0 (for O and C) or 1 (for M) for node and field attribute Minimum in our source and target structures. In most cases, the Text Element and Data Group Element will correspond to nodes and the Data Element Level to fields. We will see that in additional examples later on.
Data types in Cargo-IMP
a represents a single alphabetic character.
n represents a single numeric character.
m represents only mixed alpha (characters A through Z) and figures (numerals 0 through 9).
t represents a character in free form text (alphabetic, numeric, hyphen, full stop or space).
Data types a, m, and t will be modelled as data type "String" while n will be modelled as Integer or BigDecimal (and sometimes as String if leading zeros have to be preserved).
The following indicators are used in conjunction with the above symbols:
[ ] brackets framing symbols indicate the optional status of the characters, e.g. [aa] represents 2 optional alphabetic characters.
[N] indicates a number N of characters or group of characters; e.g. a[N] represents a number N of alphabetic characters, aaa[N] represents a number N of the group of 3 alphabetic characters.
[...N] indicates a number of characters or group of characters up to and including a number N.
[M...N] indicates a number of characters or group of characters where M is the lower limit and N is the upper limit inclusively.
n[...12]p indicates a 12-digit numeric element which could include a decimal point.