Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

INITIATE statement

Function

The INITIATE statement causes the Report Writer to begin the processing of one or more reports.

Format


INITIATE {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 INITIATE statement indicates those reports (report-name-1...) which the Report Writer is to start generating.

  3. The INITIATE statement instructs the Report Writer to perform the following initialization functions for each named report:

    • Set all sum counters to zero.

    • Set LINE-COUNTER special register to zero.

    • Set PAGE-COUNTER special register to one.

General rules

  1. The INITIATE statement does not open the file the named report is associated with. This report file, which is defined as a sequential output file, must therefore be OPENed as OUTPUT before execution of the INITIATE statement.

  2. If an INITIATE statement is followed by a second (different) INITIATE statement specifying the same report as the first one, an intervening TERMINATE statement must first be executed for this report.

  3. If an INITIATE and a TERMINATE statement were executed for a given report without an intervening GENERATE statement, the TERMINATE statement cancels the INITIATE statement without printing the report (or any portion thereof).

  4. Following execution of the INITIATE statement, and prior to execution of the (chronologically) first GENERATE statement, the programmer may select certain optional functions of the Report Writer by using the MOVE statement to supply the proper value to the CBT-CTR special register (see section "CBL-CTR special register").