Skip to content

Introducing Report Groups

A report group is an uninterrupted block of report lines, from zero up to any number. With the exception of MULTIPLE PAGE groups (see MULTIPLE PAGE clause), the lines in a report group are always together on the same page and are generated in a single operation. Of the seven TYPEs, all but the DETAIL groups are produced automatically. Your program issues at least one GENERATE statement for each DETAIL group (or for the report as a whole), and any other groups that you have defined are automatically generated in the correct positions relative to the DETAILS, depending on their TYPE.

Your RD entry may be followed by any number of Report Group Descriptions, but there is a limit to the number each TYPE other than DETAIL. Each Report Group Description begins with a 01 level-number entry in the A-margin. More information about report groups follows or may be found later in this part (see TYPE clause).

Report Groups: Keyword Table

The following table lists the major report writer keywords that may appear in a Report Group Description, with a summary of their purposes. The third and fourth columns tell you whether or not the item is provided by IBM's OS/VS and DOS/VS COBOL and, if so, whether COBOL-IT Report Writer extends the facilities. The clauses may be found, listed in alphabetical order by keyword, following this section.

If you wish to remain compatible with OS/VS or DOS/VS COBOL, you should avoid the new keywords and the extensions to the old ones, possibly by using the option described in Installation and Operation to restrict your use of extended features. You will find additional information on this subject in the Compatibility paragraph at the end of each section.

Keyword Table

Keyword Purpose OS/VS, DOS/VS COBOL? Extensions to OS/VS and DOS/VS COBOL
TYPE (01-level only ...) Indicates whether group is produced automatically, (PH,PF,CH,CF,RH,RF) or GENERATED explicitly (DE) Yes
  • TYPE keyword optional
  • ▫ optional FOR/ON with CH/CF
  • CH FOR control OR PAGE form
  • no TYPE = TYPE DETAIL
  • multiple CONTROL FOOTING
Next Group Provides extra vertical space between groups Yes
  • PLUS can be written +
  • optional words BODY and DE OR CH
  • optional ON before NEXT PAGE
Group Limit Gives lowest permissible position for body group No
Multiple Page Allows a group to span several pages No
Repeated Repeats body groups side-by-side across page No
Line (allowed at all levels...) Specifies vertical position Yes
  • PLUS can be written +
  • multiple form
  • LINE alone = LINE PLUS 1
  • LINE PLUS ZERO = LINE PLUS 0
  • LINE without subordinate COLUMNs gives blank line
  • absolute may follow relative if group starts with absolute
  • RH/RF or body groups may occupy several pages
Occurs Indicates repeating item No
Varying Defines internal counter for use as subscript, etc. No
Present/Absent When Gives condition for printing or skipping item No
Present/Absent After Specifies internal condition for printing/skipping No
Group Indicate Simple form of PRESENT AFTER Yes May be used at group level
Blank when Zero Causes zero value to be spaces Yes Allowed at group level
Justified Changes alignment rules for alphanumeric fields Yes Allowed at group level
Sign Changes output convention for "S" PICTURE symbol No LEADING literal TRAILING literal format for user-specified "signs"
Wrap Allows data to wrap around onto continuation lines No
Style Invokes a special printer property No
Usage Documentary Yes DISPLAY-1 for DBCS items
Column (elementary level only ...) Specifies horizontal position Yes
  • may be shortened to COL
  • relative form (+ or PLUS)
  • CENTER and RIGHT options
  • multiple format
  • allowed alone as dummy entry
Picture Gives format in which field is to be presented Yes
  • Source keyword optional
  • arithmetic-expression format
  • Rounded phrase
  • SUM or COUNT term may be used as operand
  • multiple format
  • multiple-choice format
Value Specifies fixed value for report item Yes
  • Value keyword optional
  • multiple format
  • assumes default PICTURE
Function Specifies run time routine to provide contents of item No
Sum Indicates totalling of specified item(s) Yes
  • optional word OF after SUM
  • arithmetic-expression format
  • may be used as term in SOURCE expression
  • allowed in non-CF groups
  • may refer to SOURCE/VALUE
  • ROUNDED phrase/li>
  • ANS-74/85 method (no SOURCE SUM correlation) available
  • automatic check for overflow
  • > 1 SUM clause in entry ok
Count Counts appearances of item(s) No
Page-/Line Counter Special registers for page number & vertical position Yes
  • need not be qualified in REPORT SECTION/DECLARATIVES
  • adding to LINE-COUNTER creates gap on page
Column - Counter Special register for horizontal position No
Back to top