Reality
English Reference
This section describes English, a powerful data retrieval and report generating language. It is intended for those who have some knowledge of Reality.
To make full use of this section, it will be useful if you have followed the tutorials in the Beginner's Guide to English and have some basic knowledge of MultiValue or Reality principles.
Contents
This topic briefly introduces English. Some changes in terminology are described, for users with previous knowledge of English. It then describes the contents of this section and lists sections referenced by or associated with this section.
Introduction to English, discusses the purpose of English and outlines how it is used.
The English Sentence, describes in detail how an English sentence can be structured to obtain information from the database.
English Commands, describes the commands that comply with this structure (and some associated commands) and their use in commands entered at TCL (at the colon prompt on a terminal).
List Processing Commands, describes additional commands that do not follow this structure but that are used for processing lists of items and can therefore be used in association with English (and TCL-II) commands.
File and Data Definition Items, describes the dictionary file items that define the meanings of the components of an English sentence.
Conversion Codes, describes the codes that are used within data definition items to define the processing to be carried out on the data file attribute(s) that the definition refers to.
Macros, describes the special dictionary items that allow sets of components of an English sentence to be pre-coded and replaced by a single word.
Introducing English
English retrieves and organizes data in a way that is completely transparent to the user. It uses processors that activate predefined instructions, making it very powerful and easy to use.
English sentences
An English sentence is basically a directive that selects, organizes, and outputs data. A directive starts with a command name followed by an object (a file name) and can have qualifying clauses. The command and the file name are mandatory, and the command must be the first word in the sentence. The command identifies a processor that acts primarily on the contents of the specified file. Subsequent clauses are optional, and except where otherwise noted, can be entered in any order.
For example, a natural English directive such as "show me the accounts" translates into an English sentence similar to the following:
LIST LEDGER
A more complex directive such as "print the accounts paid in 1994 arranged alphabetically by customer" could be set up as the following English sentence:
LIST LEDGER WITH ACCOUNT-PAID-YR = "1994" BY CUST (P)
Dictionaries and Data Definition Items
Information, such as dates, is often stored in a format unsuitable for a report. Dates are converted to an external format through codes in data definition items in a dictionary file. Other codes can be used to extract data from a file other than the named file, to perform mathematical functions, concatenate fields, extract specific data from a field, and so on.
Terminology Changes
This version of the English documentation includes some terminology changes that have been made to improve the clarity of the description given.
Data definition item
Items in a dictionary previously known as attribute definition items are now described as data definition items. This change enables the distinction between the attributes of the definition item and those of the data items themselves to be made clearer.
Attribute 8 codes
Conversion codes in attribute 8 of a data definition item, which are applied to data file values before selection and sorting, were previously known as correlatives. This term could be misleading and has been replaced by attribute 8 codes or pre-processor codes.
Attribute 7 codes
Conversion codes in attribute 7 of a data definition item, which are applied to data file values after sort/selects and immediately before output, and are also applied 'inversely' (where possible) to applicable values specified in an English sentence for comparison with file data, were previously known just as conversions. As this is ambiguous (codes in both attributes are conversion codes), they are now described as attribute 7 codes or input/output conversions.
File specifier/dynamic Q-pointer
The parameter file-specifier has been used within this section (and in other parts of the documentation) to eliminate the constant repetition of the explicit indication in syntax descriptions that a file name can generally be preceded by DICT or alternatively can be followed by a comma and the name of a data section (where a data section other than the default is required), and can also specify the account on which the file is defined. The account specification allows you to set up a dynamic Q-pointer to a file on another account on your current database. Any instances where this is modified are fully detailed where applicable. See the General Conventions section for a definition of file-specifier.
Values and value strings
The term mask has been replaced by value or
References
The following documents are either referenced or can be used in conjunction with this section:
See the Document Directory for a description of the complete range of Reality user documentation.
Conventions
Conventions used in this section are listed in General Conventions.