Sentence Structure
An English sentence has a structure similar to that of an imperative sentence in spoken English. It must have a command name and a filename, which is similar to a direct object in the spoken language. The command name specifies the process to be performed. The filename indicates the data to be referenced and the dictionary that defines the attributes (fields) of the data. These two elements are the only essential parts of the sentence.
Optional Clauses
In English, as in the spoken language, you can add optional clauses to modify the basic command. When any or all of the optional clauses are omitted, English takes defaults that still typically give a useful result. One clause can specify the item-ids that are to participate in the process. Other clauses can contain selection criteria which qualify which of these items are to be processed, give the criteria for sorting, specify the output (listing the attributes to be output and the output format), and so on.
Outline Syntax
Syntax Elements
English-command Is selected from those described in English Commands. Each command can be used with some or all of the optional clauses.
file-specifier Identifies the main file to be processed and can include modifiers. For details, see General Conventions.
item-list Consists of an explicit item-id list or item-id selection clauses. An explicit list consists of one or more item-ids enclosed in single quotes. A selection clause has value strings enclosed in single quotes and must include at least one relational operator. In the absence of an explicit item-id list an 'implicit' list can be provided by a command such as GET-LIST or SELECT executed immediately before the English command. If no item list is supplied all items in the file are initially selected for processing.
selection-criteria Begin with a selection connective followed by an attribute name. The attribute name can be followed by relational operators and value strings within double quotes. These criteria qualify the items to be processed.
sort-criteria Consists of a sort modifier, followed by an attribute name. Specify the order in which data is listed. Can also 'explode' a report by sorting lines corresponding to multivalued attributes by value, and 'print limit' output of values (see output-specification below).
output-specification
Consists of the names of attributes that are to be included in the report, optionally preceded by the connective TOTAL or BREAK-ON. Print limiters (values strings enclosed in double quotes after the attribute name, optionally preceded by relational operators) can be used to restrict the values within those attributes output.
format-specification
Comprises modifiers, such as HEADING, ID-SUPP, and DBL-SPC, that format a report.
Macros
English allows the use of macros to predefine parts of a sentence. You define a macro as a dictionary item with the macro name as item-id. The macro contains one or more optional sentence elements. You invoke the macro by including its name in a sentence. The English processor looks for the macro in the currently active dictionary and includes all of its text parts in the sentence.
USING Clause
You may include one USING clause in the sentence to specify that another file contains the attribute and macro definition items referenced in the sentence. Each macro definition can also contain a USING clause to define the terms used within that macro.
Options
English command options are letters enclosed in parentheses, which modify the action of the command.
Print Limiters
Sort criteria and output specifications can include 'print limiters' which suppress output of particular values according to specified criteria.
Example of an English Sentence
SORT GUESTS WITH BILL-CODE = '18' BY ROOM BILL-CODE TOTAL BILL-AMT LAST-NAME HDR-SUPP (P
where:
SORT |
is the English command |