Previous Topic Next topic Print topic


TYPE

Identify a report group, such as a header line, detail line, or footer line.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax: for Format 1, page header

TYPE [IS] PAGE HEADING|PH
    [LINE [NUMBER IS] number     ]  [.]
                      PLUS number

Syntax: for Format 2, page footer

TYPE [IS] PAGE FOOTING|PF
    [LINE [NUMBER IS] number]
    [NEXT GROUP [IS] number     ]  [.]
                     PLUS number

Syntax: for Format 3, report header

TYPE [IS] REPORT HEADING|RH
    [LINE [NUMBER IS] number     ]
                      PLUS number
                     number
    [NEXT GROUP [IS] PLUS number]  [.]
                     NEXT PAGE 

Syntax: for Format 4, report footer

TYPE [IS] REPORT FOOTING|RF
                      number
    [LINE [NUMBER IS] PLUS number]  [.]
                      NEXT PAGE

Syntax: for Format 5, control headers and footers

TYPE [IS] CONTROL HEADING|CH [FINAL] 
controldataname
          CONTROL FOOTING|CF
                      number
    [LINE [NUMBER IS] PLUS number]
                      NEXT PAGE
                     number
    [NEXT GROUP [IS] PLUS number]  [.]
                     NEXT PAGE

Syntax: for Format 6, detail lines

detaildataname TYPE [IS] DE[TAIL]
                      number
    [LINE [NUMBER IS] PLUS number]
                      NEXT PAGE
                     number
    [NEXT GROUP [IS] PLUS number]  [.]
                     NEXT PAGE

Parameters:

CONTROL FOOTING|CF Print group totals immediately following the detail lines each time a control group ends, that is, when a control break occurs.
CONTROL HEADING|CH Print heading line(s) before each detail group, that is, when a control break occurs.
controldataname Designate control data name. Unless FINAL, code controldataname in the corresponding RED keyword CONTROL clause.
DETAIL|DE Specify the body group, that is, lines containing data items of a report. See also Comments below.
detaildataname Name of detail line.
FINAL Specify the highest, most inclusive, control group. Implicit; does not have to be coded in order to be used in a CONTROL FOOTING.
LINE number Designate the line number where the current header, footer, or detail line prints. Number (maximum 3 digits) must be within the defined page limits. Specify the RED keyword PAGE LIMIT clause.
LINE NEXT PAGE Print the current header, footer, or detail line on a new page.
LINE PLUS number Designate the line where the current header, footer, or detail line prints, and optionally insert blank lines. Number (maximum 3 digits) must be within the defined page limits.

PLUS increments the line number by number, causing blank lines. A simpler way to print blank lines, however, is to include them in your mock-up.

NEXT GROUP number Designate the line number where the next TYPE entity prints (for example, a detail line, header, or footer). Number (maximum 3 digits) must be within the defined page limits. Specify the RED keyword PAGE LIMIT clause. See also Comments below.
NEXT GROUP PLUS number Designate the line where the next TYPE entity prints, and optionally insert blank lines (for example, a detail line, header, or footer). Number (maximum three digits) must be within the defined page limits.

PLUS increments the line number number, causing blank lines. A simpler way to print blank lines, however, is to include them in your mock-up. See also Comments below.

NEXT GROUP NEXT PAGE Print the next TYPE entity on a new page (for example, a detail line, header, or footer). Do not code NEXT PAGE with PAGE FOOTING.
PAGE HEADING|PH First line(s) on each page. AMB processes PAGE HEADING as the first report group on each page, unless a REPORT HEADING, that is not on a page by itself, precedes it. AMB ignores PAGE HEADING on a page that contains only a REPORT HEADING or REPORT FOOTING. See also Comments below.
PAGE FOOTING|PF Last line(s) on each page. AMB processes PAGE FOOTING as the last report group on each page of a report, unless a REPORT FOOTING, that is not on a page by itself, follows it. AMB ignores PAGE FOOTING on a page that contains only a REPORT HEADING or REPORT FOOTING. See also Comments below.
REPORT FOOTING|RF Last line(s) of the report. The TERMINATE statement processes REPORT FOOTING as the last report group.
REPORT HEADING|RH First line(s) of the report. It is the first report group and processes once per report.

Comments:

  • Enter at least one TYPE statement per report.
  • Code a TYPE statement for each report group in the report, that is, each type of report line.
  • Code at least one detail line for each report, including a summary report. Without a detail line, SUM accumulators are not summed.
  • AMB ignores NEXT GROUP with CONTROL FOOTING, unless CONTROL FOOTING is at the highest level for a control break.
  • Code LINE NUMBER and NEXT GROUP clauses on separate lines.
  • Specify the PAGE HEADING and PAGE FOOTING report groups only if the RED statement has a PAGE LIMIT clause. Specify the CONTROL HEADING or CONTROL FOOTING in the RED CONTROL clause. FINAL is implicit.

Examples:

01     TYPE IS REPORT HEADING    
           NEXT GROUP IS NEXT PAGE.   
01     TYPE IS PAGE HEADING.  
       SOURCE IS PAGE-COUNTER        PIC ZZZ9
01     PART-DETAIL TYPE IS DETAIL. 
       MOCKUP LINES 5 THRU 6   
       SOURCE IS PM-PART-NO          PIC XXXXXXXX
       SOURCE IS PD-LONG-DESC        PIC X(50) 
       SOURCE IS PM-UNIT-BASE-PRICE  PIC $$$,$$9.99
01     TYPE IS CONTROL FOOTING.  
       MOCKUP LINES 7    
 SUM PM-UNIT-BASE-PRICE PIC $$$$,$$9.99 

Print a report heading on line 20.

 01    TYPE IS REPORT HEADING LINE 20.

Insert blank lines in the report by incrementing the line number by two before printing the footer.

 01    TYPE IS REPORT FOOTING LINE PLUS 2.

Print two blank lines between groups. Indentation causes continuation when coding NEXT GROUP PLUS 2.

 01    TYPE IS CONTROL FOOTING WS-LOCATION-CODE
          NEXT GROUP PLUS 2.

Increment the page counter after printing a line.

 01   TYPE IS REPORT HEADING
          NEXT GROUP NEXT PAGE.
Previous Topic Next topic Print topic