SEQUENCE Type

12-1
The SEQUENCE type allows the definition of a fixed number of components where order is relevant. As for a set, within a sequence each component must be given a name, unless its base type is a CHOICE. When a sequence is transferred from one system to another the items in the SEQUENCE are sent in the order defined. Items in the sequence can be optional, as indicated by the OPTIONAL keyword.
Mapping Services allows items of a SEQUENCE, or a SEQUENCE OF, construct (and only these constructs) to be of a fixed length. All other components must have a variable length structure, with a tag value so that each component can be recognized. Mapping Services ensures the sequence is reflected in the local form data. A compiler directive is used to indicate fixed data items, for example:
Contact ::= SEQUENCE {    name      --< FIX(20) >--  GraphicString,    birthDate --< FIX(8) >--   GraphicString,              -- YY/MM/DD    age       --< FIX(3) >--   INTEGER    sex--     --< FIX(1) >--   ENUMERATED {                                           female(0),                                           male(1) },    address              [1]   Address,    previousAddress      [2]   Address }
In this example the first four components are fixed, and occupy the first 32 bytes of the SEQUENCE. The last two component are variable structures, and follow in sequence after the first 32 bytes.

External Form -- Input and Output

All structures have an external form that is the same as their local form.

Local Form and Behavior

The local form of a SEQUENCE is the data stream consisting of each sequence component, where each component has its leading tag and length (where applicable, as determined by the parent component) and data in the local form for its type.

Named Values

Named values are not applicable to the SEQUENCE type.

Constraints

Constraints are not applicable to the SEQUENCE type.