Skip to main content

4.3 Data Element Syntax

This message format specification defines nineteen (19) different data elements. Section 4.3.1 defines the encoding form for data elements in general and the syntax for each data element. Section 4.3.2 describes the use of specific data elements as part of the Data Element Contents of a Field data element. A summary of the syntactic form appears in Appendix F; summaries of the data element syntax appear in Appendix G.

4.3.1 Data elements​

This section presents the general syntactic form for all data elements defined by this message format specification and the detailed syntax for each data element. The data elements are presented by syntactic class: primitive data elements (Section 4.3.1.1), constructors (Section 4.3.1.2), and data elements which can be either (Section 4.3.1.3).

For convenience, the following terminology is used in this section.

Term            Meaning

Primitive a Primitive Data Element

Constructor a Constructor Data Element

Element any Data Element

The syntax of each Element is presented in graphic form. The following conventions apply in the diagrams. A single octet is represented as follows.

+--------+
| |
+--------+

Components that vary in length are represented as follows.

+---//---+
| |
+---//---+

Each Element has up to five components: an Identifier, a Length Code, a Qualifier, a Property-List, and the Data Element Contents.

In the diagrams, the contents of the identifier octet is shown as a "P" followed by an identifier represented in binary. (See Figure 4.)

A length code is always represented in the following manner:

+---//---+
|Lxxxxxxx|
+---//---+

A qualifier is always represented in the following manner:

+---//---+
|Qxxxxxxx|
+---//---+

A Property-List (if present) always immediately precedes any occurrence of Data Element Contents.

The Data Element Contents appears in diagrams as one of the following:

  • "element(s)", which may be any data element(s)
  • "anything," which is undefined and may be any combination of bits
  • a specific data element
  • the interpretation to be applied to the bits within the octets that constitute the element (such as ASCII or Integer)

Two data elements have been reserved for special purposes. The Extension data element is provided to allow for future expansion of the possible data elements. The Vendor-Defined data element allows CBMS vendors to define their own data elements. Vendor-Defined data elements are not guaranteed to be unique, since two implementations could define different data elements using the same identifier. Vendor-Defined data elements should be used and interpreted by prior agreement.

In the following sections, each element is presented with its name, compliance classification (BASIC or OPTIONAL), its identifier (both in hexadecimal and in octal), a brief description of its use, and a graphic representation. Each data element description has the following form.

Data Element             (Compliance)   identifier   identifier
Name ( Category ) octet octet
16 8

Description of the syntax of the data element.

+---//---+
| | Diagram representing data element
+---//---+

4.3.1.1 Primitives​

The data elements in this section are arranged in alphabetical order by name. (Appendix C presents the identifiers in numeric order.)

ASCII-String (BASIC) - identifier octet 02 (base 16), 002 (base 8)

This data element contains a series of ASCII characters [NatB-80], each character right-justified in one octet. For 7-bit ASCII characters, the most significant bit of each octet must be 0.

Note: The ASCII code table can be extended through standardized techniques [NatB-75] to introduce additional 7-bit or 8-bit characters or additional code tables.

+--------+---//---+----//-----+
|P0000010|Lxxxxxxx|ASCII chars|
+--------+---//---+----//-----+

Bit-String (OPTIONAL) - identifier octet 43 (base 16), 103 (base 8)

This data element contains a series of bits. It uses the Qualifier data element component to record the number of bits of padding (as an eight bit unsigned integer) needed to fill the final octet of the Data Element Contents to an even octet boundary. These padding bits have no meaning and occur in the low order bits of the final octet. The valid values for the Qualifier component are 0 through 7. The number of bits in the Data Element Contents is calculated from the following formula.

8   *   number of octets   -   value of
in the Data Qualifier component
Element Contents
+--------+---//---+---//---+---//---+
|P1000011|Lxxxxxxx|Qxxxxxxx| bits |
+--------+---//---+---//---+---//---+

Boolean (OPTIONAL) - identifier octet 08 (base 16), 010 (base 8)

This data element contains one octet whose value is either true or false. False is represented by all bits being 0; true is represented by all bits being 1 (although any non-zero value should be interpreted as true).

+--------+---//---+--------+
|P0001000|Lxxxxxxx| T or F |
+--------+---//---+--------+

End-of-Constructor (BASIC) - identifier octet 01 (base 16), 001 (base 8)

This data element terminates the Data Element Contents in a constructor data element that has indefinite length. This data element has no Contents component. (Use of this element is described in Section 4.2.2.1.)

+--------+---//---+
|P0000001|Lxxxxxxx|
+--------+---//---+

Integer (OPTIONAL) - identifier octet 20 (base 16), 040 (base 8)

This data element contains a 2's complement integer of variable length, high order octet first. It is recommended that the data element contents be either 2 or 4 octets long whenever possible.

+--------+---//---+---//---+
|P0100000|Lxxxxxxx| Integer|
+--------+---//---+---//---+

No-Op (OPTIONAL) - identifier octet 00 (base 16), 000 (base 8)

This data element does nothing. No-Op is used whenever it is necessary to include a data element that means "no operation." It is a short placeholder.

+--------+---//---+
|P0000000|Lxxxxxxx|
+--------+---//---+

Padding (OPTIONAL) - identifier octet 21 (base 16), 041 (base 8)

This data element is used to fill any number of octets. The contents of a Padding element are undefined and convey no information.

+--------+---//---+---//---+
|P0100001|Lxxxxxxx|anything|
+--------+---//---+---//---+

4.3.1.2 Constructors​

The data elements in this section are arranged in alphabetical order.

Compressed (OPTIONAL) - identifier octet 46 (base 16), 106 (base 8)

This data element must contain a Bit-String data element. It is used to represent any data that has been compressed; it may be used wherever its uncompressed contents may appear. A Qualifier data component appears in each Compressed data element; it contains a compression identifier (CID) to identify the compression algorithm used. (See Section 4.3.5.) The Data Element Contents contains the product of the compression process.

+--------+---//---+---//---+--------//--------+
|P1000110|Lxxxxxxx|Qxxxxxxx|Bit-String Element|
+--------+---//---+---//---+--------//--------+

Date (BASIC) - identifier octet 28 (base 16), 050 (base 8)

This data element contains an ASCII-String data element, which is a representation of a date and time formatted in accordance with PUBS 4 [NatB-68], 58 [NatB-79a] and 59 [NatB-79b]. The use of time and time zone is optional. It is recommended that numeric offsets be used to indicate time zone rather than alphabetic abbreviations.

+--------+---//---+------//------+
|P0101000|Lxxxxxxx| ASCII-String |
+--------+---//---+------//------+

Encrypted (OPTIONAL) - identifier octet 47 (base 16), 107 (base 8)

This data element must contain a Bit-String. It is used to represent any data that has been encrypted; it may be used wherever its unencrypted contents may appear. A Qualifier data component appears in each Encrypted data element; it contains an encryption identifier (EID) identifying the encryption algorithm used. The Data Element Contents is the product of the encryption process.

+--------+---//---+---//---+--------//--------+
|P1000111|Lxxxxxxx|Qxxxxxxx|Bit-String Element|
+--------+---//---+---//---+--------//--------+

Field (BASIC) - identifier octet 4C (base 16), 114 (base 8)

This data element uses a Qualifier data element component. The Qualifier component contains a Field Identifier (FID) indicating which specific field is being represented.

+--------+---//---+---//---+---//---+
|P1001100|Lxxxxxxx|Qxxxxxxx|elements|
+--------+---//---+---//---+---//---+

Message (BASIC) - identifier octet 4D (base 16), 115 (base 8)

This data element may contain Field or Message data elements. Its Qualifier component contains a Message type (MID) indicating the type of the message. (The MID is completely different from the message identifier in the Message-ID field and should not be confused with it.)

+--------+---//---+---//---+
|P1001101|Lxxxxxxx|Qxxxxxxx|
+--------+---//---+---//---+

+--------//---------//---------//---------//--------+
| Field, Message, Encrypted, or Compressed Elements |
+--------//---------//---------//---------//--------+

Property-List (OPTIONAL) - identifier octet 24 (base 16), 044 (base 8)

This data element contains a series of Property data elements to be associated with another data element.

+--------+---//---+-------//--------+
|P0100100|Lxxxxxxx|Property Elements|
+--------+---//---+-------//--------+

Property (OPTIONAL) - identifier octet 45 (base 16), 105 (base 8)

This data element uses a Qualifier data element component. The Qualifier component contains a Property-Identifier (PID) to indicate which specific property is being represented.

+--------+---//---+---//---+---//---+
|P1000101|Lxxxxxxx|Qxxxxxxx|elements|
+--------+---//---+---//---+---//---+

Sequence (OPTIONAL) - identifier octet 0A (base 16), 012 (base 8)

This data element contains any series of data elements. Sequence differs from Set in that the data elements making up the Data Element Contents must be considered as an ordered sequence (according to their order of appearance in the sequence.)

+--------+---//---+---//---+
|P0001010|Lxxxxxxx|elements|
+--------+---//---+---//---+

Set (OPTIONAL) - identifier octet 0B (base 16), 013 (base 8)

This data element contains any series of data elements with no ordering of the elements implied. (Sequence provides an ordered series.) Although the data elements contained in a Set must be stored sequentially, the order in which they are stored is not defined and not processed.

+--------+---//---+---//---+
|P0001011|Lxxxxxxx|elements|
+--------+---//---+---//---+

Unique-ID (OPTIONAL) - identifier octet 09 (base 16), 011 (base 8)

This data element is a unique identifier. It need not be human-readable. The Data Element Contents may be an ASCII-String, a Bit-String, or an Integer.

+--------+---//---+---//---+
|P0001001|Lxxxxxxx| element|
+--------+---//---+---//---+