CONTROL BREAK ALGORITHM

        Set all hold fields.
        Perform LOOP until no-more-records.
        Perform END.

LOOP.
        If major break perform MAJOR.
        If intermediate break perform INTERMEDIATE.
                        .
                        .
        If minor break perform MINOR.
        [PROCESS THE RECORD: do detail line, add to minor total, etc.]
        Read next record.

MAJOR.
        Perform INTERMEDIATE.
        Write totals.
        Change hold field.
        Roll totals.
        Reinitialize counter(s).

INTERMEDIATE.
        Perform MINOR.
        Write totals.
        Change hold field.
        Roll totals.
        Reinitialize counter(s).

MINOR.
        Write totals.
        Change hold field.
        Roll totals.
        Reinitialize counter(s).

END.
        Perform MAJOR.