The ONPAGE.PRG program illustrates the use of the ON PAGE command to print headers and footers at a page break. The program uses the LIST command to print the contents of a database file. When a page control break occurs, the ON PAGE command procedure BREAK executes. The BREAK procedure displays the footer for the current page followed by a page eject and the header for the next page.