Skip to main content
Previous sectionNext section

BREAK.SUP clause

Indicates changes of values with line breaks.

Synopsis

BREAK.SUP field ["'code'"]

Description

The BREAK.SUP clause inserts a blank line break indicator in the display at each point where the field value changes. Optionally, you can specify a code of "'B'" to provide the current field value to the header, or a code of "'P'" to issue a page break at each point where the field value changes. "'N'" is a synonym for "'P'".

You can specify multiple BREAK.SUP clauses to insert breaks for multiple levels of sorting.

If the DET.SUP keyword is specified, CMQL detects breaks where the break field has BREAK.SUP, but only outputs a break line for it if it is the lowest level break. If both the DBL.SPC and DET.SUP keywords are specified, the DBL.SPC overrides the DET.SUP break line suppression.

The BREAK.SUP clause differs from the BREAK.ON clause in two ways:

  • BREAK.SUP does not display the break field values unless you specify this field as a display column. BREAK.ON always displays the break field values.

  • BREAK.SUP indicates a field value change with a blank line. BREAK.ON indicates a field value change either with *** (the default) or a user-specified break string.

Multiple CMQL clauses may be specified in any order. The order of application of CMQL clauses is always the same. The BREAK.SUP clause is applied after the WITH clause, the SAMPLED clause (if present), and the SAMPLE clause (if present).

The following example displays the a break indicator each time the F1 field value changes:

LIST VOC BREAK.SUP F1 WHERE FILENAME >= "A"
Copy code to clipboard

It lists output such as the following, where blank line breaks indicate changes in the F1 value:

VOC......... ...............
 
A
 
 
ABORT
 
 
AFTER
ALL
ALL.MATCH
AN
AND
ANY
ARE
AS
ASC
ASD
 
 
ASSIGN

If you wish to display the actual field values, you must specify the field, as shown in the following:

LIST VOC F1 BREAK.SUP F1 WHERE FILENAME >= "A"
Copy code to clipboard

The following example shows the use of the code parameter to supply the current F1 value to each page header and issue a page break:

LIST VOC BY F1 BREAK.SUP F1 "'BP'" HEADING "Type='B'"
Copy code to clipboard

In this case, the VOC is sorted by F1 values. Each time the F1 field value changes, the 'P' letter code issues a page break. The 'B' letter code supplies the current F1 field value to the page header. Note that the F1 values are not displayed; however, the F1 value for the current page is shown in the page header.