DLR ST CITY GL-NO GL-Amount
75000 AB EDMONTON 1611005 0000000039155
75000 AB EDMONTON 3501060 0000000039155
75024 AB CALGARY 1611005 0000000062308
75024 AB CALGARY 3501060 0000000062308
75025 AB LETHBRIDGE 1611005 0000000004555
75025 AB LETHBRIDGE 3501060 0000000004555
75026 AB RED DEER 1611005 0000000035413
75026 AB RED DEER 3501060 0000000035413
In above input file GL-Amount is PIC 13 N 2
As the output should look like
State CITY DLR GL 1611005 GL 3501060 TOTAL GL AMOUNT
AB EDMONTON 75000 391.55 391.55 783.1
EDMONTON 75001 391.55 391.55 783.1
CALGARY 75024 623.08 623.08 1246.16
LETHBRIDGE 75026 354.13 354.13 708.26
City total EDMONTON: 1566.2
City total CALGARY: 1246.16
City total LETHBRIDGE: 708.26
State total AB 3520.62
Currently we have coded the output looks like below
1) Currently we have given control state so it is printing the totals for state .when we give control on city whenever there is break in city it is printing total over there.
2) In above output file we have state total ,in state total it is printing totals of all GL’s which is not required only Total of GL-amount is required .for reference please see the below screen
Why didn't you use the Code tags everywhere needed on your post?
You haven't shown a line of program code. I'm assuming Easytrieve, but don't know where you got the word PIC from in that context.
You have a manual?
You'll need to look at SEQUENCE, SUM, SUMCTL, CONTROL, SUMFILE. Your requirement to print the cities in a block at the end is best-satisfied by doing them as a seperate REPORT from a SUMFILE from this REPORT.