Chapter 17. The Report Writer Module

OBJECTIVES

To familiarize you with

  1. The Report Writer Module.

  2. The options available for printing reports.

INTRODUCTION

COBOL has a Report Writer Module that greatly facilitates print operations. By including additional DATA DIVISION entries, the Report Writer Module will automatically handle all:

  1. Spacing of forms.

  2. Skipping to a new page.

  3. Testing for end of page.

  4. Printing of headings at the top of a page and footings at the bottom of a page.

  5. Accumulating of amount fields.

  6. Testing for control breaks.

  7. Detail and/or summary printing.

  8. Printing of totals for control breaks.

  9. Printing of a final total when there are no more input records.

The Report Writer Module provides a facility for producing reports by focusing on the physical characteristics of the report rather than specifying the detailed procedures necessary to produce the report. Many new DATA DIVISION entries are required when using this module but there are very few PROCEDURE DIVISION entries.

THE BENEFITS OF THE REPORT WRITER MODULE

For Detail and Summary Printing

You will recall that many reports in businesses require:

  1. Detail printing The printing of one or more lines for each input record.

  2. Summary or group printing The printing of totals or other summary information for groups of records.

The Report Writer Module can be easily used for both detail and/or summary reports.

For Control Break Processing

One type of summary or group printing uses a control break procedure as discussed in Chapter 10. We review control ...

Get COBOL for the 21st Century now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.