action.skip

Report Writer Verbs: Overview

The three main report writer verbs INITIATE, GENERATE, and TERMINATE may be used in the same way as any other COBOL verb and may be used anywhere in the program except in a USE BEFORE REPORTING Declarative SECTION. Of the remaining procedural statements, the USE BEFORE REPORTING directive enables you to write a section of code in the DECLARATIVES portion that is to be performed automatically just before the specified report group is output, and the Report Writer SET statements make it possible to place report groups irregularly on the page.

Sequence of Operations

For a single report using a simple file as input, the normal sequence of operations is as follows:

sequence of operations

with the following basic plan for the PROCEDURE DIVISION:

procedure division

Keyword Table

The following table lists the PROCEDURE DIVISION elements associated with COBOL-IT Report Writer with a summary of their purposes. The third and fourth columns tell you whether or not the item is part of the current standard (ANS 85) COBOL and, if so, whether COBOL-IT Report Writer extends the facilities.

Keyword Purpose OS/VS, DOS/VS, COBOL? Extensions to OS/VS and DOS/VS COBOL
Initiate Prepares report for processing Yes INITIATE...UPON file-name
Report may be global
Generate Handles main report processing Yes Improved order of totalling
Page-fit and DECLARATIVES if NOOSVS option used
Report may be global
Terminate Concludes all processing for report Yes Report may be global
Use before Reporting Invokes SECTION in DECLARATIVES when named report group is printed Yes May specify Detail group
May be global
Suppress Printing Prevents data being printed for a report group No
Move 1 To Print-Switch Alternative to Suppress Printing Yes
Set Page/Line/Column Controls Page Buffer operations No