Attribute Definition Items

Attribute Definition Items define the format of items in the data file. These items can be created using the Editor. Creating A Database describes the creation of Attribute Definition items in the process of building a dictionary.

Item-ID. A logical name used to reference the contents of the attribute in INFO/ACCESS statements.

Attributes. Attribute Definition items can have 10 attributes. Attributes 5 and 6 are reserved and are therefore empty.

  1. Definition Code. Any one of these Definition Codes specify an Attribute Definition item:

  2. A

    An Attribute Definition item that references the contents of an attribute in the data file.

    S

    An Attribute Synonym. Same as A for all practical purposes. (The LISTDICT Proc sorts S after A codes). Attribute synonyms are usually created as a numerical sequence of item-IDs to define the default output specifications for INFO/ACCESS reports.

    I

    An INFO/ACCESS phrase follows in line 2.

    X

    A placeholder item that is skipped when maintaining a sequence of numeric item-IDs to specify the default output specification for INFO/ACCESS reports. The attribute referenced by an X item is not displayed.

  3. Attribute Number. An integer identifying the attribute by its sequential location. Also called the Attribute Mark Count (AMC). An attribute number of 0 is used to reference the item-ID. A 0 or any number greater than the number of attributes that exist in the file can be used to reference data that is derived or computed rather than actually stored on disk. In addition, if line 1 defines a phrase, then the actual phrase that is interpreted by INFO/ACCESS starts on line 2.

  4. Tag. An optional name that is used in place of the item-ID as a column heading in INFO/ACCESS reports. The backslash (\) is a reserved symbol causing no tag to be output. You can use value marks (CTRL+]) to indicate a line break, making it possible to place a column heading on multiple lines. If the heading is shorter than the column width, it is padded with dots (…).

  5. Structure. An optional code that defines an associative structure for two or more MultiValued attributes. A structure code of C indicates a Controlling attribute; a structure code of D indicates a Dependent attribute. Dependent attributes can be listed in an INFO/ACCESS report only when the Controlling attribute appears in the output specification.

  6. Reserved.

  7. Reserved.

  8. Conversion Code. A conversion specification that is applied to the contents of the attribute. Used by INFO/ACCESS processor.

  9. Correlative Code. A correlative specification that is applied to the contents of the attribute. Used by INFO/ACCESS processor.

  10. Justification. A code that specifies the justification of the output field in a column. It also affects the sorting of data.

  11. L

    Left-justified (generally the case for textual or letter-based data). If data exceeds the length defined by the maximum column width, it wraps to the next line, beginning at the first character over the maximum length.

    R

    Right-justified (generally the case for numeric data).

    T

    Left-justified. This type of justification is used for textual data that might include embedded blank spaces. If data exceeds the length defined as the maximum column width, T justification attempts to avoid splitting words by wrapping entire words to the next line, starting at a blank space. Used by INFO/ACCESS processor.

    U

    Unjustified. Beginning at the left-most position of a column, text continues past the right column edge, possibly overwriting content in the next adjacent column. U justification does not wrap to the next line.

  12. Width. A positive integer indicating the maximum column width of the column. Used by INFO/ACCESS processor.

The following example of an Attribute Definition item is taken from the CUSTOMERS file:

PHONE

001 A

002 6

003 Phone

004

005

006

007 ML(###-###-#### ####)

008

009 R

010 17

This item defines the sixth attribute in a data item. It supplies a column heading and a conversion code that presents this numeric data in a conventional format. If the following piece of data is stored in Attribute 6 of an item in the data file and a conversion code (line 7) is applied on output, the data will have the format of a phone number:

5168769091

516-876-9091

The table below shows the contents of some of the Attribute Definition items in the ORDERS dictionary.

item-ID

CUST.ID

DATE

PRODUCT

QTY

PAYMENT

D/CODE

A

A

A

A

A

A/AMC

1

2

3

4

5

S/NAME

Customer ID

Date of Order

Product

Quantity

Payment

S/AMC

 

 

C;4

D;3

 

V/CONV

 

D2/

 

 

 

V/CORR

 

 

 

 

 

V/TYP

L

L

L

R

L

V/MAX

10

10

5

3

10

The CUSTOMERS Dictionary

The codes stored in S/AMC and V/CONV require some further explanation, which is covered in later sections.

This table describes a data file item format consisting of five attributes. The attribute number (A/AMC) references the sequential location of attributes in the data file item.

See Also

Dictionary Items

Account Definition Items

Verb Definition Items

File Definition Items