PURPOSE: The EJECT statement prints the top of form character @TOF. It is used in Process Modules (PM) that direct reports to System Files (SF) for subsequent printing on a line printer (or a terminal with form feed controls). This statement allows you to move to the top of the next page without executing the footings section or incrementing the page count.
EJECT [ON n] [HUSH] [IF; UNLESS clause] [iterate clause]
n |
is a number or declared field that gives the number of the report to which the statement applies. |
INITIAL SECTION
TYPE "ENTER CODE: ", NOCR
ACCEPT CODE
EJECT
HEADINGS SECTION
After the user enters a code, ACCENT R prints the @TOF character and begins printing the report at the top of the next page.
NOTES: EJECT does not increment @PAGE.
This statement prints only the @TOF character on the output file, whereas the @TOF in a PRINT statement causes FOOTINGS section and HEADINGS section to be executed even when other objects are included in the print list.
The EJECT statement (without HUSH, the IF - UNLESS clause or iterate options) can be included in a PRINT statement.
The EJECT statement is often used in the INITIAL or TITLE section of a reporting PM to insure that the report begins printing at the top of a page on a form feed printer.