Function
The report group description entry describes and defines the format, type, and properties of a report group as a series of elementary items and items associated with information. These items, organized in lines and columns, form the line(s) to be printed in a report group.
A prepositioning to the next report group to be written may be achieved by a NEXT GROUP phrase.
Using the type of report group, demands are placed both on the description of the report group and on the Report Writer when the report group is created. For example, the page positioning of a report group is also determined by the type of the report group. Much the same is true of the time the report group is produced. Summations, for instance, can be defined in control footings only. They are executed immediately preceding the creation of detail groups or the control footings concerned, depending on type of summation.
Format
01 [data-name-1]
TYPE clause
[LINE clause]
[NEXT GROUP clause]
02 [data-name-2]
[LINE clause]
[COLUMN clause]
[GROUP INDICATE clause]
[ PICTURE clause]
[BLANK WHEN ZERO clause]
[JUSTIFIED RIGHT clause]
[SIGN clause]
[USAGE clause]
{SOURCE clause | SUM clause | VALUE clause}
Syntax rules
The description of a report group must begin with a 01-level entry, followed by at least one 02-level entry.
With the exception of the data-name, which must immediately follow the level-number, the clauses may be written in any order.
A report consists of a series of report groups. Up to seven different report group types (see section "TYPE clause") may appear in the report.
By definition, a report group consists of one or several elementary items, where each item with a COLUMN clause (printable item) must be assigned to one line. Report groups which do not contain printable items are non-printable. A printable report group is a unit comprising one or more lines.
With the exception of the report heading and the report footing, any report group may be created several times in the course of creating report; in this case, there must be no change in the report group format or in the constant information contents.
No more than 127 report group description entries may be specified in a report description entry.
The data-name which immediately follows the level-number 01 is the name of the report group. It must be supplied if the report group is to be referenced directly in a GENERATE statement (detail group), a USE BEFORE REPORTING statement, an UPON phrase within a SUM clause, or is to be used for qualification.
The TYPE clause specifies the type of report group, enabling the Report Writer to determine the modalities (when, where) for producing that report group.
The LINE clause assigns the printable items specified within its range to a line of the current or next print page. The first LINE clause of a report group description entry therefore determines the positioning of that report group. The range extends until the next LINE clause or the end of the report group entry.
The NEXT GROUP clause causes (after a report group is printed) the next report group to be positioned to the line number supplied in the phrases of the NEXT GROUP clause.
The COLUMN, GROUP INDICATE, BLANK, JUSTIFIED, and PICTURE clauses define the location and format of the printable data item for a particular print line of the report group.
SOURCE, SUM, and VALUE clauses associate the data items with the respective information. In addition, the SUM clause also defines an internal sum counter whose contents is automatically updated by the Report Writer.
Each printable item must be covered by a LINE clause. This LINE clause represents a print line.
The PICTURE clause can only be omitted for an elementary item if a VALUE clause is specified with an alphanumeric or hexadecimal alphanumeric literal. The compiler then assumes a PICTURE clause PICTURE X(length), where length is the number of characters displayed by the literal.
General rules
The name of a report group may be specified in the REPORT SECTION and in the Procedure Division. Only names of control footings and detail groups may be supplied in the REPORT SECTION. While the name of a detail group may be defined in the UPON phrase of a SUM clause, the name of a control footing may be used only for qualifying a sum counter. In the Procedure Division, the name of a report group may be specified only in two cases:
The name of a detail group may be specified in a GENERATE statement.
In a USE BEFORE REPORTING statement, any report group name (except names of detail groups) may be used.
A data-name immediately following the level-number 02 of a report group entry should not be specified unless that data item description includes a SUM clause. In this case, the data-name will be interpreted as the name of the sum counter which is established as a result of the SUM clause (see section "SUM clause"). The name of a sum counter may again be specified in a SUM clause. If the data-name is supplied although no SUM clause is present, in other words, if the data-name is defined as the name of the item, its use is illegal.
Sum counters may only be qualified by report group names and/or report names.
Report group description entry clause summary
Table 40 lists the report group entry clauses and briefly describes each.
The BLANK WHEN ZERO, JUSTIFIED, PICTURE, USAGE and VALUE clauses are also used in other sections of the Data Division; that is, they are assumed to be known here (refer to the pertinent descriptions).
All other report entry clauses are described on the following pages, in alphabetical order.
Clause | Brief description |
BLANK WHEN ZERO | Indicates that a printable item is not to be printed when its contents are zero. |
COLUMN | Defines an item as printable by specifying the starting position (column number) of that field on the print line. |
GROUP INDICATE | Indicates that the printable item is to be printed only if the detail group with which it is associated is written for the first time in the report, after a page advance or a control break. |
JUSTIFIED | Explicitly specifies the positioning of data in the associated item. |
LINE | Specifies the line on the report page on which one or more printable items within its range are to be printed. |
NEXT GROUP | Specifies prepositioning for the next report group to be printed. |
PICTURE | Specifies the characteristics of a data item or of a data item and an internal sum counter. |
SIGN | Specifies the position and the mode of representation of the operational sign for numeric data items. |
SOURCE | Associates a data item with a sending field as its source of information. |
SUM | Indicates how and which addends are to be accumulated in the internal sum counter. The sum counter is built automatically. Also, this clause associates the data item with the sum counter as its source of information. |
TYPE | Specifies the particular type of report group being described. |
USAGE | Specifies the data format used for storing an elementary item. |
VALUE | Defines a constant value for a printable item. |
Table 40: Report group entry clauses