Special language elements are available for generating reports (report writer language features). These features allow the user to define the format and contents of a report in the Data Division in such detail that only a few Procedure Division statements are required to produce the report.
A printed report displays specific information in a structured format. The total number of all files and report description entries in a compilation unit must not exceed 254.
The Data Division contains report description entries that
name the reports to be generated by the Report Writer
assign the reports to a file (report file) to which they are to be written, and
describe the content and format of reports to be generated.
The statements by which the reports are generated are specified in the Procedure Division.
The Report Writer produces the desired reports according to the defined formats by
transferring program data into the reports in the required format,
accumulating data sums, which are added up to subtotals and final totals,
updating line and page counters, and
editing and printing the generated reports.
The Report Writer described in this manual is functionally equivalent to the optional Report Writer module described in ANS85, except for some minor differences in syntax.