Report Definition Library

Using the report definition file, the report compiler, rptgen , generates a report definition (.rd) library for each report program. When you compile an application program, the report compiler copies the program .rd library into the report program.

The report compiler generates the .rd libraries with the file name format

$LAWDIR/productline/systemcodesrc/programcode.rd

An .rd library has three sections: the data variables, the report variables, and the group variables.

The RPT-DATA-VAR section defines the data variables for the report. Each line is a COBOL description of the fields defined in the $FORMAT section of the report definition file. To name each field, rptgen combines the $PREFIX parameter with the field names in the $FIELDS section. The COBOL picture (PIC) of each field in the $FORMAT section determines the size of that field.

The ProgramCode-REPORT section defines each report ($REPORT) in the report definition file. These variables are used internally.

The ReportName-GROUP section of the report definition library defines each group ($GROUP) in the report definition file. All printing in a report occurs at the group level.