Attribute 8 Versus Attribute 7 Processing

Data Formats

During the course of processing an English sentence, the English processor handles data in three formats:

Attribute 8 (Pre-processor)

Codes in attribute 8 transform data from stored to intermediate format. Data in intermediate format is then used for such processing as sorting or selecting items. If a data definition item does not have any codes in attribute 8, the stored format and the intermediate format are the same.

Attribute 7 (Input/output Processor)

Codes in attribute 7 transform data from the intermediate format to the output format. For example, you would normally use codes in this attribute to add a currency sign, thousands separators, and a decimal separator to a numeric value to display the number as a money amount. If a data definition item does not have any codes in attribute 7, the intermediate format and the output format are the same.

Input Conversions

When a selection clause references a data definition item with codes in attribute 7, the processor uses the codes to change the selection clause value to the intermediate format. This is called an input conversion.

An example of using this inverted processing is when you specify an attribute with a date conversion in attribute 7. When you use this attribute in a selection clause, the processor changes the date from the external to the intermediate format, which is the same as the stored format, a positive or negative number that signifies the number of days after or before December 31, 1967. In other words, an input conversion allows the processor to change a single value and make fast, easy comparisons. If you specified the date conversion in attribute 8 instead of attribute 7, the processor would have to change each stored value into the intermediate format before making the comparison.

Not all conversions can be inverted. Limitations are specified within appropriate individual code descriptions.

Multiple Codes

You can specify multiple codes within attribute 7 or 8 simply by separating the codes by value marks (CTRL+]). Multiple codes are processed left-to-right, each code acting on the result produced by the previous code.

Go to top button