Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

TERMINATE statement

Function

The TERMINATE statement instructs the Report Writer to complete the processing for the specified reports.

Format


TERMINATE {report-name-1}...


Syntax rules

  1. report-name-1 must be defined by a report description in the REPORT SECTION of the Data Division (RD entry).

  2. The TERMINATE statement indicates those reports whose processing the Report Writer is to complete.

  3. For each report specified in the TERMINATE statement, the Report Writer performs the following steps in the stated order:

    1. All control footings are created as if they were to be printed as the result of a control break at the highest level of hierarchy (obviously, this implies creating the page footing and the page heading if a page advance is required, and the execution of summations).

    2. The page footing is generated.

    3. The report footing is generated.

    However, the above actions are not taken if no GENERATE statement was executed for the report between the INITIATE and TERMINATE statements.

General rules

  1. Each TERMINATE statement for report-name-1 must be chronologically preceded by an INITIATE statement for report-name-1.

  2. Since the TERMINATE statement does not close the associated report file, it must be chronologically followed by a CLOSE statement. Each INITIATEd report in a particular file must be TERMINATEd before a CLOSE statement is executed for that report file.