Skip to main content

Appendix H. Examples: Data Elements

This appendix presents at least one example for each of the data elements defined in this message format specification. In these examples, identifier octets are represented in binary form. All other numbers are presented in hexadecimal. ASCII strings are shown as characters rather than their numerical representation. Although this message format specification does not define the syntax of names and addresses, message originators and recipients are identified by their names. This does not imply anything about how naming and addressing can or should be done; it is simply a convenient way to identify message originators and recipients in these examples.

H.1 Primitive Data Elements​

This section contains an example of each of the primitive data elements. Each example contains a short explanation and a series of octets.

No-Op data element:

+--------+--------+
|00000000|00000000|
+--------+--------+

End-of-Constructor data element:

+--------+--------+
|00000001|00000000|
+--------+--------+

Boolean data element whose value is true:

+--------+--------+--------+
|00001000|00000001|11111111|
+--------+--------+--------+

Integer data element containing five octets of data. Its value is 4,294,967,296 (decimal):

+--------+--------+--------+--------+--------+
|00100000| 0 5 | 0 1 0 0 0 0
+--------+--------+--------+--------+--------+

+--------+--------+
0 0 0 0 |
+--------+--------+

Padding data element containing three octets of padding. The values of those three octets are meaningless:

+--------+--------+--------+--------+--------+
|00100001| 0 3 | F F F F F F |
+--------+--------+--------+--------+--------+

ASCII-String data element containing nine characters. Its value is "Hi There.":

+--------+--------+---- ----+
|00000010| 0 9 |Hi There.|
+--------+--------+---- ----+

Bit-String data element containing 44 bits of data (((7-1) x 8) - 4). Six octets are used to hold those 44 bits. The last 4 bits in the final octet are padding and are therefore ignored.

Bit-String  Length   Spare
+--------+--------+--------+--------+--------+
|01000011| 0 7 | 0 4 | 0 A 3 B
+--------+--------+--------+--------+--------+

+--------+--------+--------+--------+
5 F 2 9 1 C D 0 |
+--------+--------+--------+--------+

H.2 Constructor Data Elements​

This section contains an example of each of the constructor data elements. Each example contains a short explanation and then an annotated series of the data elements making up the constructor.

Property-List data element containing one Property data element. The property is Printing-Name and its value is "Distribution":

Prop-List  Length  Property  Length    PID
+--------+--------+--------+--------+--------+
|00100100| 1 1 |01000101| 0 F | 0 2 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 0 C |Distribution|
+--------+--------+---- ----+

Printing-Name Property. The value of the Printing-Name is "Distribution":

 Property  Length    PID     ASCII    Length
+--------+--------+--------+--------+--------+
|01000101| 0 F | 0 2 |00000010| 0 C |
+--------+--------+--------+--------+--------+

+---- ----+
|Distribution|
+---- ----+

Compressed data element. Its contents were compressed using an as-yet-undefined NBS standard data compression algorithm. The compressed data is in a bit-string that is 56 bits long, fully filling 7 octets:

Compressed  Length   CID   Bit-String  Length
+--------+--------+--------+--------+--------+
|01000110| 0 B | 0 1 |01000011| 0 8 |
+--------+--------+--------+--------+--------+

Spare
+--------+--------+--------+--------+
| 0 0 | 1 C 5 F 2 D
+--------+--------+--------+--------+

+--------+--------+--------+--------+
7 7 B A F 6 2 9 |
+--------+--------+--------+--------+

Encrypted data element. The encryption method used to encrypt its contents has been intentionally not specified. This element contains a Bit-String which contains 22 bits (((4-1) x 8) - 2) of data. These 22 bits are represented in octets; the final 2 bits in the final octet are padding and are therefore ignored:

Encrypted   Length   EID   Bit-String  Length
+--------+--------+--------+--------+--------+
|01000111| 0 7 | 0 0 |01000011| 0 4 |
+--------+--------+--------+--------+--------+

Spare
+--------+--------+--------+--------+
| 0 2 | A 3 7 8 1 C |
+--------+--------+--------+--------+

Date data element. This example includes a date but no time. The date shown in this example is August 15, 1980:

  Date     Length   ASCII    Length
+--------+--------+--------+--------+--- ---+
|00101000| 0 A |00000010| 0 8 |19800815|
+--------+--------+--------+--------+--- ---+

Unique-ID data element, which is represented as an Integer data element whose value is 129 (decimal).

Unique-ID  Length   Integer  Length
+--------+--------+--------+--------+--------+--------+
|00001001| 0 4 |00100000| 0 2 | 0 0 8 1 |
+--------+--------+--------+--------+--------+--------+

Sequence data element containing two ASCII-String data elements. The first ASCII-String is "This is" while the second string is " a list":

 Sequence  Length   ASCII    Length
+--------+--------+--------+--------+--- ---+
|00001010| 1 2 |00000010| 0 7 |This is|
+--------+--------+--------+--------+--- ---+

ASCII Length
+--------+--------+--- ---+
|00000010| 0 7 | a list|
+--------+--------+--- ---+

Set data element containing two Integer data elements. The first integer has a value of 519 (decimal) while the value of the second is 71 (decimal). (These two value have no ordering because they belong to a set.)

   Set     Length   Integer  Length
+--------+--------+--------+--------+--------+--------+
|00001011| 0 8 |00100000| 0 2 | 0 2 0 7 |
+--------+--------+--------+--------+--------+--------+

Integer Length
+--------+--------+--------+--------+
|00100000| 0 2 | 0 0 4 7 |
+--------+--------+--------+--------+

Field data element. The specific field shown is the Text field with the contents "I will see you at lunch.":

  Field    Length    FID      ASCII   Length
+--------+--------+--------+--------+--------+
|01001100| 1 B | 0 4 |00000010| 1 8 |
+--------+--------+--------+--------+--------+

+---- ----+
|I will see you at lunch.|
+---- ----+

Message containing four fields, Posted-Date, From, Text, and To. It was sent on July 4, 1980 at 6 p.m. eastern daylight time. It is from a person named Smith. The text of the message is a question asking the recipient "Are you going to watch the fireworks?". The message is sent to Jones:

 Message   Length    Type    Field    Length
+--------+--------+--------+--------+--------+
|01001101| 5 8 | 0 1 |01001100| 1 7 |
+--------+--------+--------+--------+--------+

FID Date Length ASCII
+--------+--------+--------+--------+
| 0 2 |00101000| 1 4 |00000010|
+--------+--------+--------+--------+

Length
+--------+---- ----+
| 1 2 |19800704-180000EDT|
+--------+---- ----+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 8 | 0 1 |00000010|
+--------+--------+--------+--------+

Length
+--------+-- --+
| 0 5 |Smith|
+--------+-- --+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 2 8 | 0 4 |00000010|
+--------+--------+--------+--------+

Length
+--------+
| 2 5 |
+--------+

+---- ----+
|Are you going to watch the fireworks?|
+---- ----+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 8 | 0 5 |00000010|
+--------+--------+--------+--------+

Length
+--------+-- --+
| 0 5 |Jones|
+--------+-- --+

Extension data element containing a length code and 3 octets. The octet immediately following the length code identifies it as Extension Data Element 7. The Data Element Contents is the final two octets. The interpretation of the Data Element Contents would be defined in an extension or successor to this message format specification. [Note: this is an example. Any actual extension data element 7 (if it were ever used) would be completely different from anything done here.]:

Extension  Length
+--------+--------+--------+--------+--------+
|01111110| 0 3 | 0 7 | 4 A E 9 |
+--------+--------+--------+--------+--------+

Vendor-Defined data element containing a length code and 3 octets. The first octet identifies this as vendor-defined data element number 114 (decimal), which this particular vendor has defined to contain three printable ASCII characters in two octets. (Data element 114 (decimal) for another user would be completely different. For example, it might contain a floating point number.):

   User    Length
+--------+--------+--------+--------+--------+
|01111111| 0 3 | 7 2 | P O E |
+--------+--------+--------+--------+--------+