# Control break

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Control_break
> Markdown URL: https://mediated.wiki/source/Control_break.md
> Source: https://en.wikipedia.org/wiki/Control_break
> Source revision: 1311772819
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Change in the value of one of the keys on which a file is sorted

Not to be confused with 'Control-Break' displayed in MS-DOS when cancelling an ongoing task by pressing [Ctrl+Break](/source/Break_key) key combination.

In [computer programming](/source/Computer_programming), a **control break** is a change in the value of one of the [keys](/source/Key_field) on which a file is sorted, which requires some extra processing.[1][2][3][4] For example, with an input file sorted by post code, the number of items found in each postal district might need to be printed on a report, and a heading shown for the next district. Quite often there is a hierarchy of nested control breaks in a program, such as streets within districts within areas, with the need for a grand total at the end. [Structured programming](/source/Structured_programming) techniques have been developed to ensure correct processing of control breaks in languages such as [COBOL](/source/COBOL) and to ensure that conditions such as empty input files and [sequence errors](https://en.wikipedia.org/w/index.php?title=Sequence_error&action=edit&redlink=1) are handled properly.[5][6]

With [fourth-generation languages](/source/Fourth_generation_language) such as [SQL](/source/SQL), the programming language should handle most of the details of control breaks automatically.[7][8][9]

## References

1. **[^](#cite_ref-1)** [Computer Programming Languages in Practice: Made Simple Computerbooks](https://books.google.com/books?id=EGWeBQAAQBAJ&dq=Control+break+computer+programming&pg=PA201), 2014, page 32-227

1. **[^](#cite_ref-2)** [Logic and Structured Design for Computer Programmers](https://books.google.com/books?id=J88gAQAAIAAJ&q=Control+break+computer+programming), 2001, page 74-390

1. **[^](#cite_ref-3)** [Programming Logic and Design, Introductory](https://books.google.com/books?id=RzAeCgAAQBAJ&dq=Control+break+computer+programming&pg=PT368), 2014

1. **[^](#cite_ref-4)** [Introduction to computer programming RPG](https://books.google.com/books?id=pkwsAQAAIAAJ&q=Control+break+computer+programming), 1972, pages 1-8

1. **[^](#cite_ref-5)** [Academic Press Dictionary of Science and Technology](https://books.google.com/books?id=nauWlPTBcjIC&dq=Control+break+computer+programming&pg=PA512), 1992, pages 307-2112

1. **[^](#cite_ref-6)** [Introduction to computer programming structured COBOL](https://books.google.com/books?id=cE0gAQAAIAAJ&q=Control+break+computer+programming), 1977, pages 8-20

1. **[^](#cite_ref-7)** [Joe Celko's SQL for Smarties: Advanced SQL Programming](https://books.google.com/books?id=Hi9fMnOoRtAC&dq=Control+break+computer+programming+SQL&pg=PA528), 2010, page 528

1. **[^](#cite_ref-8)** [Oracle SQL](https://books.google.com/books?id=ytBQAAAAYAAJ&q=Control+break+computer+programming+SQL), 2003, pages 76-201

1. **[^](#cite_ref-9)** [Relational Databases: State of the Art Report 14:5](https://books.google.com/books?id=HUSeBQAAQBAJ&dq=Control+break+computer+programming+SQL&pg=PA46) 2014, page 46

---
Adapted from the Wikipedia article [Control break](https://en.wikipedia.org/wiki/Control_break) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Control_break?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
