Previous Topic: Constraints

Next Topic: External Form—Input and Output

SEQUENCE Type

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.