Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

TYPE clause

Function

The TYPE clause indicates the type of the report group in whose description it appears; that is, it defines the functional characteristics of the report group, thereby also specifying the circumstances under which the Report Writer will generate that report group.

Format


TYPE IS {  {REPORT HEADING | RH}                         
         | {PAGE HEADING | PH}                           
         | {CONTROL HEADING | CH} {data-name-1 | FINAL}
         | {DETAIL | DE}                                 
         | {CONTROL FOOTING | CF} { data-name-2 | FINAL }
         |
{PAGE FOOTING | PF}                           
         | {REPORT FOOTING | RF}                     
        }   


Syntax rules

  1. RH is the abbreviation for REPORT HEADING.

    PH is the abbreviation for PAGE HEADING, etc.

  2. FINAL, data-name-1 and data-name-2 must be defined in the CONTROL clause of the associated report description (RD) entry.

  3. REPORT HEADING indicates the report group which is created only once per report as the first report group in that report. It is created automatically when the first GENERATE statement is executed.

  4. PAGE HEADING indicates a report group which is created as the first group on every page. A page which is wholly reserved for the report heading or report footing is not assigned a page heading. If a report heading is present but does not appear on a page by itself, the page heading is generated as the second group on the first page of the report.

  5. CONTROL HEADING indicates report groups which are written in series when executing the (chronologically) first GENERATE statement and upon every control break. Each control heading is associated (by FINAL or data-name-1) with one, and only one, hierarchical level, which determines the order in which the control headings are printed (see section "CONTROL clause").

  6. DETAIL indicates those report groups which are written because they are supplied in a GENERATE statement. The name of a detail group must be unique throughout the report.

  7. CONTROL FOOTING indicates those report groups which are written in series upon every control break and when the TERMINATE statement is executed. Each control footing is associated (by FINAL or data-name-2) with one, and only one, hierarchical level, which determines the order in which the control footings are printed (see section "CONTROL clause").

  8. PAGE FOOTING indicates the report group which is generated as the last group of each report page. Any page that is wholly reserved for the report heading or report footing is not assigned a page footing. If the report footing does not appear on a page by itself, the page footing is generated as the last but one group on the last page of the report.

  9. REPORT FOOTING indicates a report group that is produced only once, as the last group in the report. The report footing is the last group printed when the TERMINATE statement is executed.

General rules

  1. Rules for the report heading

    1. Only one report heading may be defined for each report.

    2. The report heading may be printed on a whole page by itself. The NEXT GROUP clause with the NEXT PAGE phrase specified may be used to make sure that the same page will contain no further group besides the report heading (see section "NEXT GROUP clause").

  2. Rules for page heading and page footing

    1. Only one page heading and one page footing may be defined for each report.

    2. Normally, the page heading appears as the first report group and the page footing appears as the last report group on every page of the report, with the following exceptions:

      • On the first page of the report, the page heading is preceded by the report heading in those cases where the report heading is not to appear on a page by itself.

      • The page footing of the last page of the report is followed by the report footing in those cases where the report footing is not to appear on a page by itself.

  3. Rules for control headings and control footings

    1. Only one control heading and one control footing may be specified for each level of hierarchy.

    2. Control headings and control footings are printed at the following times:

      • When the first GENERATE statement for a report is executed, the Report Writer prints the entire hierarchy of control heading report groups (in the order highest level first, lowest level last) before printing the detail group as the immediate product of the GENERATE statement.

      • If the Report Writer detects a control break when executing one of the (chronologically) next GENERATE statements, it creates the appropriate series of control footings and control headings before the detail groups directly referenced by the current GENERATE statement (see  section "GENERATE statement" and section "CONTROL clause").

      • When production of a report ends by execution of the TERMINATE statement, the Report Writer generates all control footings in increasing order of hierarchy levels.

    3. FINAL, data-name-1 or data-name-2 specified in the TYPE clause of a control heading or control footing must appear in the CONTROL clause of the associated report description entry.

    4. A control heading or control footing associated with FINAL may only be generated once for each report, as the first body group of the report (execution of the first GENERATE statement) or as the last (execution of the TERMINATE statement).

  4. Rules for detail report groups

    The Report Writer generates a detail report group only when it is specified in a GENERATE statement and when this GENERATE statement is executed. At least one detail report group must be defined for each report. This is true, even if the detail report group is not explicitly used for generating the report; that is, even if it is mainly a summary report without going into details (that is, detail report groups) (see section "GENERATE statement").

  5. Rules for the report footing

    1. Only one report footing may be defined for each report, and it is printed as the last report group in the report.

    2. The report footing may appear on a page by itself, by specifying the first LINE clause with the NEXT PAGE phrase in the description of the report footing (see section "LINE clause").

  6. Sequence of report groups within a report

    1. No report group of a report may be printed either before the report heading or following the report footing.

    2. The (schematic) sequence of the heading and footing groups for a report is this:

      Report heading (may only appear once)
      Page heading
      ...
      Control heading
      Detail
      Control footing
      ...
      Page footing
      Report footing (may only appear once)

    3. The control headings are always created in immediate succession in hierarchical order:

      Control heading with FINAL (highest level, may only appear once)
      Control heading at next highest level
      ...
      Control heading at lowest level

    4. The control footings are always created in immediate succession in hierarchical order:

      Control heading at lowest level
      Control heading at next lowest level
      ...
      Control footing with FINAL (highest level of hierarchy, may only appear once).