BREAK-ON is an output modifier used with LIST and SORT commands that specifies which attribute is to be used to create breaks within a report. A control break (indicated by three asterisks or by user-specified text) occurs when the data for the specified attribute changes.
The BREAK-ON modifier is often used with the TOTAL modifier to calculate subtotals for numeric data. Normally the data is sorted by the same attribute as the one specified by BREAK-ON so that the same set of data is processed and displayed together.
To set control breaks for a MultiValued attribute, use the BY-EXP or BY-EXP-DSND modifiers to display individual detail lines for each value.
Format
BREAK-ON attribute [" [text] ['options '] [text] "] |
Parameter(s)
attribute |
Attribute whose changing data causes a break. INFO/ACCESS evaluates the first 24 characters of the data, from left to right. The break is displayed in this attribute's column. |
|
text |
Printed on the break line. This text replaces the three asterisks that are output by default. Enclose the text in double quotes. |
|
options |
Affect the processing of the break and must be enclosed in single quotes. |
|
B |
(Break) Includes the value of the attribute causing the break in the heading or footing. It must be used in conjunction with the B option of the HEADING or FOOTING modifiers. A new page is generated for each control break. |
|
D |
(Data) Suppresses printing of the break line if there is only one line of detail for a section, but leaves a blank line between items. |
|
L |
(Line) Suppresses the blank line preceding the break line. The L option has no effect when specified with the U option. |
|
P |
(Page) Begins a new page after every control break. |
|
R |
(Rollover) Forces all data associated with a control break to appear on the same page. |
|
U |
(Underline) Underlines all totals for each control break. |
|
V |
(Value) Inserts the current data for the attribute into the text on the break line. |
Description
In the INFO/ACCESS query, the break attribute should be entered immediately after the BREAK-ON modifier and its accompanying parameters.
The attribute specified by the BREAK-ON modifier is automatically included in the output specifications for the report, so it does not need to be specified separately in the INFO/ACCESS query.
To suppress the printing of the BREAK-ON attribute, place a \ in Attribute 3 and a 0 in Attribute 10 of the Attribute Definition item (in the file dictionary) that defines the BREAK-ON attribute.
Example
This example sorts orders by last name and breaks the display at the occurrence of each new name, and illustrates use of the L option:
>SORT ORDERS BY LAST-NAME BREAK-ON LAST-NAME" 'L' " TOTAL.AMT |
||
|
|
|
PAGE 1 15:46:36 DD MMM YYYY |
||
|
|
|
ORDERS..... |
LAST-NAME..... |
TOTAL.AMT. |
|
|
|
10113 |
JENKINS |
$357.00 |
|
*** |
|
|
|
|
10101 |
JOHNSON |
$18.00 |
10107 |
JOHNSON |
$799.00 |
10111 |
JOHNSON |
$126.00 |
|
*** |
|
|
|
|
10102 |
LEARY |
$72.00 |
10108 |
LEARY |
$252.00 |
10112 |
LEARY |
$231.00 |
10114 |
LEARY |
$47.00 |
|
|
|
|
|
|
10106 |
ORLANDO |
$63.00 |
|
*** |
|
See Also