attribute.defining.items Introductory/BASIC: Syntax


Command attribute.defining.items Introductory/BASIC: Syntax
Applicable release versions: AP, R83
Category BASIC: Syntax (110)
Description describe, format, and manipulate data contained within files.

Attribute-defining items (ADI's) are located in a file's dictionary or in the account's master dictionary. ADIs are used by nearly all Pick Processors to create data interrelationships, format data, or select data.

Each ADI in the dictionary has its name as its item-id. There may be several attribute-defining items that refer to the same attribute in an associated data file item. This typically is done when an expanded name is needed for clarity and also when different views are needed for the same data element. There is no limit to the number of attribute-defining items that can point to a specific attribute. The definition of the attributes and the attribute's master dictionary ADI are as follows:

Attribute 0: Item-Id

Attribute 0 is the item-id (or name) of the ADI item in the dictionary. For example, the item "a/amc" usually found in an account's master dictionary defines the second attribute of an ADI.

Attribute 1: Dictionary Code (d/code)

Attribute 1 contains an "a", "s", or "x" to indicate that the item is an attribute-defining item. "a" is used to indicate the "base" attribute definition, "s" is used to define surrogate or redefinitions of an attribute, and "x" is used to define "protected" attribute definitions. By convention, there is usually only one "a" ADI per attribute used to define the each attribute, all other ADIs for the same attribute is given an "s" or "x" designation. In AP, an optional description or text string may follow the "a", "x" or "s" without affecting any other normal functions.

Default attribute items have numeric item-ids starting with 1. These item-ids are used by Access verbs as output specifications if no other output specifications are given. The numeric item-ids must be consecutive; that is, in order to have the third attribute list by default, attribute items 1 and 2 must exist, even if they are not needed for the listing. The attribute items for attributes that are not needed for listings can be given a d/code of "x".

Synonym-defining items (d/code = "s") behave just like attribute-defining items (d/code = "a"). They are used when there are multiple attribute-defining items for the same attribute. (Multiple attribute-defining items for the same attribute allow applications to process the same data in different ways.) By convention, the primary attribute-defining item is created with a d/code = "a". Any other attribute-defining items for the same attribute are created with a d/code = "s".

Attribute 2: Attribute Mark Count (a/amc)

The number stored in this attribute is the attribute number where the defined attribute values are stored in each item. The first attribute in an item has an AMC of 1, the nth attribute has a AMC of n. It is used to physically locate the attribute values within the item of the associated file.

Attribute 3: Substitute Header (sub.header)

Attribute 3 is used to specify report column headings in the associated file. If a subheader is not specified, the attribute name is used as the column heading. If the column width specified in attribute 10 is not wide enough to display the heading the column is expanded to allow space for the column heading. A "" can be placed in attribute 3 to print all periods in the column header. The subheader may be multi-valued to output a multi-line heading.

Attribute 4: Structure (structure)

Attribute 4 is used to establish internal relationships within an item. The relationship between controlling and dependent attributes is such that a value must be entered into a controlling attribute before the Update processor will allow entry of values into dependent attributes. Each multi-value for the controlling attribute controls the corresponding values in the dependent attribute. The codes "c" or "d" are used to specify controlling or dependent attributes respectively. The format for usage of these codes is:


Any attribute specified by a "c" as controlled by that attribute must also have an attribute-defining item with attribute 4 specified by a "d;attr#", where "attr#" is the attribute number of the controlling attribute.

The controlling form "c;" (controlling with no dependents) is valid and can be used to force the Update processor to display the substitute-header above the field value.

Attribute 5: Reserved and Unavailable

Attribute 6: Reserved and Unavailable

Attribute 7: Output-Conversion

Attribute 7 contains processing codes which prior to output, modify non-null data contained within the referenced attribute. Processing codes are described in detail as individual tokens. The Processing Codes are used to perform data manipulations which often remove the need for a program.

Attribute 8: Correlative (correlative)

Attribute 8 contains processing codes similar to the output-conversion attribute, except the codes specified within this attribute are used to preprocess data prior to sorting or selecting in addition to display.

Attribute 9: Attribute type (justification)

Attribute 9 contains codes used to indicate the type of justification used on the attribute. See the subjects, "attribute-type" and "master dictionary" for details about this field.

Attribute 10: Column Width (column-width)

The column width attribute is used to define the minimum number of character spaces to be allocated for displaying the data within the attribute on Access reports. The actual column width used is dependent upon the column width attribute, the subsitute column heading attrbute, the item-id, the justification attribute, and the width of the display.

Attribute 11: Reserved and Unavailable

Attribute 12: Reserved and Unavailable

Attribute 13: Reserved and Unavailable

Attribute 14: Input-Conversion

Attribute 14 contains processing codes applied to data immediately after entry. These codes can be used for data validation as well as transformation. These codes are executed even if there is a null entry.

Attribute 15: Macro (macro)

The attribute names contained in this attribute are passed as an attribute name list to the UP when zooming to another item. The values named in this attribute are separated by spaces, not punctuation.

Attribute 16: Reserved and Unavailable

Attribute 17: Description (description)

This attribute is reserved for comments and descriptions concerning the function of the current attribute-defining item. The text in this attribute is displayed as the UP help message when a "?" is entered as the only data to a UP prompt.

Attribute 18: Reserved and Unavailable

Attribute 19: Reserved and Unavailable

Attributes 20 to 30: Hot Keys (hotkey.all, hotkey0, ... hotkey9)

Eleven hot keys are available to provide quick access to Pick/BASIC programs from within the Update processor. The Hot Keys are defined in a file-defining item (FDI) and attribute-defining item (ADI). The value of these keys is specified in attributes 20 to 30 in the FDI or ADI. Attribute 20 is hotkey.all, attribute 21 is hotkey1, and attribute 30 is hotkey0. A user selects which Hot Key they wish to use by typing <control>+x#, where # is a Hot Key number (0-9). Whenever a Hot Key is selected one Hot Key entry is used based upon the following search:

If the ADI has a hotkey.all entry, it is used.

If the ADI has a Hot Key # defined, where # is the number entered by the user, that Hot Key entry is used.

If the FDI has a hotkey.all entry, it is used.

If the FDI has a Hot Key # defined, where # is the number entered by the user, that Hot Key entry is used.

Only the first Hot Key entry found in the above search sequence is used.

No parameters can be passed to the Pick/BASIC subroutine called from a Hot Key.
The next two processing codes have a controlling dependent relationship.

dictionary-code        A
attribute-count        2
structure              C;3
attribute-type         L
column-width           10
description            This attribute controls attribute 3.

dictionary-code        A
attribute-count        3
structure              D;2 
attribute-type         lw
column-width           10
description            Dependent upon attribute 2.

The following ADI can be placed in a master dictionary and used for general 
purpose counting when you want to know the number of items matching a specific 

item id:               tally
dictionary-code        A
attribute-count        999
output-conversion      mrz
correlative            a"1"
attribute-type         R
column-width           4
description            Provide a constant value of 1 for commands "total 
tally det-supp" which shows the number of items from each break-on.
Related attribute-type