Output Specification
The output specification lists the attributes that you wish to have in the output report. You can present the attribute names in two ways.
One way is to name the attribute. You can follow the attribute name with a print limiter so that only the values that match the limiter are printed. You can also precede the name with one of the connectives TOTAL, MIN or MAX. If the attribute is numeric, the TOTAL connective causes the processor to keep a running total of the output from that attribute. MIN causes the minimum value of the following attribute to be output at a control break. MAX outputs the maximum. Minimum and maximum values are with respect to the last control break at the same level.
The other way is to precede the name with the connective BREAK-ON. When the processor sees a change in the contents of the attribute, it outputs a break line. You can follow the attribute name with a string of text to be output on the break line.
You can enter the attribute names with their connectives in any order. However, the processor always prints a dependent attribute to the right of its controlling attribute.
If an English sentence has an explicit output specification, the processor ignores any default output attributes in the dictionary.
Syntax
{{[TOTAL || MIN || MAX ]} attribute {printLimiter}}... {BREAK-ON attribute {"break-text"}}...
Syntax Elements
TOTAL Keeps a running total of a numeric attribute.
MIN Outputs minimum numeric value (since last control break at same level) at each control break.
MAX Outputs maximum numeric value (since last control break at same level) at each control break.
attribute The item-id of a data definition item.
{NOT} {relational-operator} "value-string"
{{logical-connective} {NOT} {relational-operator}
"value-string"}...
Print limiting suppresses output of values (to subvalue level) that do not match the clause. Suppressed values are replaced with blanks. Any detail lines that would, as a result, be left blank are suppressed. Any totals produced include just the values that match the limiting clause.
BREAK-ON Specifies that the processor is to display a break line each time its attribute changes value.
break-text Comprises printable characters and break options enclosed in single quotes. The break options are B, D, L, P, R, U and V.
Example with Attributes Only
The following sentence sorts the GUESTS file by item-id (room number) and lists with the item-id the guest's last name, address, and city.
:SORT GUESTS LAST-NAME ADDRESS CITY GUESTS Last Name. Address............. City...... 117 Rizzo 10 Webster Street Harrington 119 Scott 90 Alpine Street Harrison . . . . 523 Evans 35 Sutton Pl. New York
Example with TOTAL and BREAK-ON
The following sentence lists the bill total for each room and keeps a running total of the amounts. At each change of name, it prints the total for that name. It also prints the total at the end.
:LIST GUESTS BREAK-ON LAST-NAME TOTAL BILL-TOTAL GUESTS Last Name. Bill Total 122 Anderson $86.45 *** $86.45 444 Curtis $304.50 *** $204.50 354 Taylor $191.38 355 Taylor $191.38 *** $382.76 *** $3,639.99
Example With Print Limiter
The following sentence lists the item-ids and the names from all items in the GUESTS file, but it lists only the city if it equals "New York."
:SORT GUESTS NAME CITY = "New York" PAGE 1 GUESTS Guest Name......... City...... 117 Loretta Rizzo ... 309 Robert S.Mendell New York 318 Janis M.Petrillo ...