Establish summing capability for a non-printing detail item and sum the item in a control footing.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
Syntax:
R[EFERENCE] [IS] dataname PIC[TURE] [IS] picclause
[DATA-NAME [IS] fieldname]
Parameters:
dataname
|
Data item being referenced
|
DATA-NAME
fieldname
|
Name a sum accumulator established by a SUM or REFERENCE clause. Do not define
fieldname in Working-Storage. At generation, AMB inserts
fieldname after the level number in the report group. DATA-NAME moves the value of the internal SUM accumulator to
fieldname.
|
|
Code DATA-NAME when a SUM UPON clause references a DETAIL report group, when the program references a sum accumulator, or when a sum accumulator requires a data name for qualification.
|
PIC
picclause
|
Specify the format of
dataname. If
dataname is a report mock-up field instead of a Working-Storage field, the next matching COBOL picture in the report mock-up is the
picclause for
dataname.
|
Example:
LAST COUNT QUANTITY QUANTITY QUANTITY
LOCATION DATE IN STOCK ISSUED RECEIVED
XXXXXXXXXXXX 99/99/99 ZZZ,ZZ9 ZZZ,ZZ9 ZZZ,ZZ9
------- ------- --------
TOTAL BY LOCATION: Z,ZZZ,ZZ9 Z,ZZZ,ZZ9 Z,ZZZ,ZZ9
TOTAL NUMBER OF SALES BY LOCATION: ZZZ,ZZ9
01 DETAIL-LINE TYPE IS DETAIL.
MOCKUP LINE 16
SOURCE WS-LOCATION-CODE GROUP INDICATE
SOURCE WS-LAST-COUNT-MONTH PIC 99
SOURCE WS-LAST-COUNT-DAY PIC 99
SOURCE WS-LAST-COUNT-YEAR PIC 99
SOURCE WS-QTY-IN-STOCK
SOURCE WS-QTY-ISSUED
SOURCE WS-QTY-RECEIVED
REFERENCE WS-NO-OF-SALES PIC 9999
01 TYPE IS CONTROL FOOTING WS-LOCATION-CODE
MOCKUP LINES 17 THRU 20
SUM WS-NO-OF-SALES PIC ZZZ9
Comments: