Master Mainframe Technologies - COBOL, JCL, DB2, VSAM, CICS & More
ABEND Codes SQLCODEs File Status Interview Prep Contact
💻 COBOL

COBOL Report Writer - RD Entry

Advanced 🕑 15 min read 👁 0 views

COBOL Report Writer - RD Entry

The Report Description (RD) entry defines the physical and logical characteristics of a report.

Full Syntax

```cobol RD report-name [GLOBAL] [CODE literal] [CONTROL IS/CONTROLS ARE {FINAL} [identifier-1]...] [PAGE LIMIT IS integer-1 LINES [HEADING integer-2] [FIRST DETAIL integer-3] [LAST DETAIL integer-4] [FOOTING integer-5]] ```

PAGE LIMIT Clause

Defines vertical page layout:

  • HEADING: First line for headings
  • FIRST DETAIL: First line for detail
  • LAST DETAIL: Last line for detail
  • FOOTING: Line for page footing

CONTROL Clause

Defines control breaks: ```cobol CONTROLS ARE FINAL, DEPT-CODE, EMP-CODE ```

  • FINAL: Grand total level
  • Listed major to minor

CODE Clause

Identifies report for multi-report files.

Code Example

      * RD Entry Example (partial)
       RD EMPLOYEE-REPORT
           GLOBAL
           CODE 'EMP'
           CONTROLS ARE FINAL DEPT-CODE EMP-TYPE
           PAGE LIMIT IS 66 LINES
           HEADING 1
           FIRST DETAIL 6
           LAST DETAIL 58
           FOOTING 62.