Data Definition Item

A data definition item (formerly known as an attribute definition item) defines a specified attribute, that is, the characteristics of the data in a specified attribute. It defines the format and the type of processing required to generate an English report of that data.

Any number of data definitions can be set up in a dictionary file. Each data definition is usually associated with an attribute in a data item by specifying the attribute mark count (AMC) in attribute 2 of the data definition item. The AMC number references to the position of the attribute in each data item of the associated data sections. Hence, an item with AMC = 3 defines the data in attribute 3 of the associated data items.

When English processes an attribute, it looks for a data definition item in the file dictionary. If it fails to find one, it goes to the next level up (the MD) to look for a predefined data definition. Predefined data definition items with item ids *A1, *A2, *A3 *A4 and so on, are supplied in each MD; these have AMC's of 1, 2, 3, 4, etc., respectively. Also, Reality recognises the attribute names An, where n is the number of any attribute (see Predefined Data Definition Items).

Item format

Note

Refer to the English Reference for a detailed discussion of a data definition item.

Attribute Description
Item-id Attribute name - Used in an English sentence to reference the attribute.
  001

D/CODE - Defines the item as a data definition. This can be one of the following:

A Specifies that the item is used to format an attribute whenever it is referenced in an English statement (either explicitly or implicitly).

S The same as the 'A' code, except that the default column heading is suppressed when attribute 3 of the data definition is blank. 'S' is obsolescent as a backslash in attribute 3 now gives a 'null' heading.

X The same as the 'A ' code, except when the attribute is part of an implied output specification (for example, LIST GUESTS), in which case the attribute is skipped by the English processor.

  002

A/AMC (Attribute/Attribute Mark Count) - Specifies the attribute number/line to which the data definition refers. Exceptions are:

0 = Item-id
9998 = Ordinal number of items
9999 = Size of items

It is recommended that, for greater efficiency, this attribute should be set to 0 if its contents are not used in any conversions in attributes 7 and 8.

  003

Column heading text - Displayed in an English report as the column heading for the defined attribute (AMC). A multi-line heading can be specified by separating individual lines with value marks (X'FD').

If a heading is not specified, the column heading defaults to the item-id of the data definition item, unless an 'S' is shown in attribute 1 of the DDI.

If attribute 3 contains just a backslash (\) and attribute 1 contains A, no heading is displayed.

  004 - 006 Not used and reserved.
  007 V/CONV Conversion codes (input/output conversions) - used for processing values specified in an English sentence (input conversion), or following sort and selection processing before output (output conversion). Multiple conversion codes, separated by value marks, can be entered.
  008 V/CORR Conversion codes (pre-processor codes) - used for processing data before sort and select operations, and before attribute 7 conversions are processed. Multiple conversion codes, separated by value marks, can be entered.
  009

V/TYP - A code that specifies the position of data in the defined attribute column of a English report.

A code is mandatory and must be one of the following:

L Left aligned. Wrap to the left edge of the column if the length of the text exceeds the column width (attribute 10). The data is broken at the column width without respect to blank spaces.

R Right aligned. Wrap to the right edge of the column if the length of the text exceeds the column width (attribute 10).

T Text data (left aligned). Text wraps back to the left edge at a blank (space) character, where possible, so as not to split a word between lines.

I Indented text. Same as T, except that all lines after the first line are indented by one character space.

U Unlimited. Print the entire attribute on one line, ignoring column boundaries.

  010

V/MAX - Specifies the maximum width of the attribute column displayed by English. A numeric (decimal) value is mandatory.

If the width specified in attribute 10 is less than that of the column heading in attribute 3, the width of column heading is used.

A number of different data definition items can specify different column widths for defining the output format of the same data.

Note

A column width of zero allows you to hide a column that contains intermediate values (for example, subtotals) used in a calculation.

  011 - 020 Not used and reserved.

Case sensitivity

If keyword case-insensitivity is selected, attributes 1 and 9 of a data definition item can be in upper or lower case. Otherwise, they must be in upper case. See also Conversion Codes.