HP System Dictionary/XL General Reference Manual Vol 1 (32256-90004)
3- 27
redundant attribute names. This is especially true for alias and variable attributes, because you can
assign them to any entity or relationship.
Specifying Attribute Type and Length
System Dictionary supports six attribute types: alias, Boolean, character, floating, integer, and variable.
Boolean attributes are used to store true-or-false values. Internally, Boolean values are stored in a single
byte, but their values are typically displayed as TRUE or FALSE. An example of a Boolean attribute in the
core set is the BLANK attribute. BLANK is an attribute of all entities of type ELEMENT, and it specifies
whether zero values should be displayed as blanks or zeros.
For example, suppose a COBOL program contains a variable named YEAR-TERMINATED that displays
the year in which an employee leaves the company. If an individual is currently employed, the value of this
field is zero but is displayed as blanks. To document this variable in the dictionary, you would need to
name an entity named YEAR-TERMINATED of type ELEMENT. The attribute list of the ELEMENT
entity type (shown in Table 3-2) includes the BLANK attribute. For the YEAR-TERMINATED entity, you
would need to set this attribute to TRUE.
Integer and floating attributes store numeric values. Integer attributes can have a length of 2 bytes (16
bits) or 4 bytes (32 bits). A floating attribute can have a length of 4 bytes or 8 bytes.
Attributes of type character store fixed-length alphanumeric values. A character attribute can have a
length between 1 and 255 bytes inclusive.
Specifying Attribute Edits
An attribute of type Boolean, character, floating, or integer can have a list of edits that specify the default
and allowable values of the attribute. The first value in the edit list indicates the default value. Other
values indicate allowable values. To specify a default value while allowing any other value, you must
supply an edit list with only one edit (the default value).
Variable-Length Attributes
A variable-length attribute is an attribute of type character whose length is unrestricted. Variable-length
attributes are "free-floating" in that they never appear in the attribute list of an entity type or relationship
type but you can assign them to any entity or relationship.
Variable-length attributes typically contain descriptions, defaults, edit masks, picture clauses, or other
free-format values. Since not every entity or relationship needs these values, and since the values can be
quite large, System Dictionary reserves storage space for variable-length attribute values only if you
explicitly assign them to an entity or relationship. When you delete a variable-length attribute value,
System Dictionary releases the storage space.
DESCRIPTION, for example, is a variable-length attribute in the System Dictionary core set. Table 3-4
shows some sample entities and their DESCRIPTION attribute values. In the first and second columns
are the entity and entity type names. The third column contains the description. As the table suggests, if a
DESCRIPTION attribute value exists, it is linked to a specific entity of a specific type. Unlike the sample
attributes in Table 3-1 and Table 3-3, the DESCRIPTION attribute is not associated with any entity type