Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 6 Data : Field Names and Field Identifiers

Field Names and Field Identifiers
Programs can specify fields in two ways:
A field name is a character string. Each field can have only one name. Several fields can have the same name.
A field identifier is a 16-bit unsigned integer, which must be unique within the message. That is, two fields in the same message cannot have the same identifier. However, a nested submessage is considered a separate identifier space from its enclosing parent message and any sibling submessages.
(Java stores field identifiers as 32-bit signed integers, but the range is still only 16 unsigned bits.)
Message calls specify fields using a field name, or a combination of a field name and a unique field identifier. Field names are appropriate for most application programs; most programs do not require field identifiers.
Rules and Restrictions
NULL is a legal field name only when the identifier is zero. It is illegal for a field to have both a non-zero identifier and a NULL field name.
Search Characteristics
In general, an identifier search completes in constant time. In contrast, a name search completes in linear time proportional to the number of fields in the message. Name search is quite fast for messages with 16 fields or fewer; for messages with more than 16 fields, identifier search is faster.
Space Characteristics
The smallest field name is a one-character string, which occupies three bytes in Rendezvous wire format. That one ASCII character yields a name space of 127 possible field names; a larger range requires additional characters.
Field identifiers are 16 bits, which also occupy three bytes in Rendezvous wire format. However, those 16 bits yield a space of 65535 possible field identifiers; that range is fixed, and cannot be extended.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved