Skip to main content

Appendix H: Examples (Unknown Lengths)

H.6 Unknown Lengths​

This section contains two examples of data elements with an unknown length. The two examples have been presented in sections H.2 and H.5, but with a known rather than an unknown length.

Set data element with an unknown length 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 values have no ordering because they belong to a set.)

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

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

End-of-Con Length
+--------+--------+
|00000000|00000000|
+--------+--------+

The following sample message with an unknown length had Stevens as its originator and Johnson as its recipient. The message was sent on August 14, 1980 at 10 a.m. EDT. The subject of the message is "Project Deadline" and the message is a reminder that the deadline is the next day and that the section of the report for the project being done by Johnson should be turned in to Stevens by 3 p.m. that day.

 Message   Length    Type
+--------+--------+--------+
|01001101| 8 0 | 0 1 |
+--------+--------+--------+

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

Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+

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

Length
+--------+--- ---+
| 0 7 |Stevens|
+--------+--- ---+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 3 | 0 7 |00000010| 1 0 |
+--------+--------+--------+--------+--------+

+---- ----+
|Project Deadline|
+---- ----+

Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1000-0400|
+--------+--------+---- ----+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 6 D | 0 4 |00000010| 6 A |
+--------+--------+--------+--------+--------+

+----
|Don't forget the project report is
+----

due tomorrow. Please have<CrLf>

your section to me by three this

----+
afternoon.|
----+

End-of-Con Length
+--------+--------+
|00000000|00000000|
+--------+--------+