BREAK-ON Connective

The BREAK-ON connective causes the immediately following attribute to be monitored for a change.

Syntax

BREAK-ON attribute "{text}{'option{option}...'}{text}"

Syntax Elements

BREAK-ON Specifies that the processor is to display a break line each time its associated attribute changes value.

attribute The item-id of a data definition item.

text Comprises all printable characters except RETURN, LINE FEED, double quote, single quote, and the system delimiters.

option A BREAK-ON option.

Options

B Break. Works in conjunction with the B option of the HEADING and FOOTING modifiers to put the break value in the heading or footing. See the topic HEADING and FOOTING Modifiers.

D Data. Suppresses the break line if there is only one detail line since the last BREAK. This is the line with the asterisks, any text that is specified, or totals.

L Line. Suppresses the blank line preceding the break data line. Overrides the U option if both are specified.

P Page. Causes each break item to be output on a separate page.

R Rollover. Inhibits a page break until all the data associated with the current break is output.

U Underlines. Puts underlines on the line above the accumulated totals if the TOTAL modifier was specified. Ignored if used with the L option.

V Value. Causes the value of the control-break attribute to be inserted at this point in the BREAK-ON label.

Rule

Up to 15 breaks are allowed in one sentence. Breaks are treated in a hierarchical order. The first BREAK-ON closest to the command name is the highest level, the next break is secondary, etc. This ordering (left to right) continues to the last break specified.

Action by English

When the processor detects a change in value, it outputs a blank line, a line with three asterisks, and another blank line. If the break clause includes text, the processor outputs the text in place of the asterisks. If the text is longer than the column width, the processor applies alignment as defined for the attribute named in the BREAK-ON clause.

Suppressing Break Data

You can suppress the BREAK-ON attribute data by setting the column width for the attribute to zero (attribute 10 of the data definition item).

Used with TOTAL and DET-SUPP

BREAK-ON can be used in conjunction with the TOTAL connective to generate subtotals. If the modifier DET-SUPP is used with TOTAL and BREAK-ON, only the subtotal and grand-total lines are displayed.

Examples for using BREAK-ON in conjunction with TOTAL, GRAND-TOTAL and DET-SUPP are in the topic Subtotals and Cumulative Total with DET-SUPP.

:SORT ROOMS BY ROOM-CODE BREAK-ON ROOM-CODE "'D'"

ROOMS   Room
        Code
117     D
119     D
.       .
        ***
211     DL
289     DL
.       .
428     DL
        ***
535     P              Option D: no control break line
122     S
140     S
.       .
        ***
600     ST
        ***
***
30 ITEMS LISTED

Three asterisks are output under the attribute name whenever a control break occurs. Where only one ROOM-CODE is present (P in the example), the subsequent control data (asterisks) line is omitted as specified by the D option. Another line of three asterisks is displayed at the end of the report. If the GRAND-TOTAL modifier is used with the BREAK-ON modifier, this is where that total is displayed.