position
1 to 2 3 to 4 5 to 6
Company Dept Amt
C1 D1 10
C1 D1 10
C1 D1 10
C1 D1 10
C1 D1 10
C1 D2 10
C1 D2 10
C1 D2 10
C1 D3 10
C2 D4 20
C2 D4 20
C2 D4 20
C2 D4 20
C2 D4 20
C2 D5 20
C2 D5 20
C2 D6 20
C2 D6 20
I need only the control totals of Company and dept in my o/p as :
C1 90
D1 50
D2 30
D3 10
C2 180
D4 100
D5 40
D6 40
how can this be done ?
I tried following code.
LIST ON
*******************************************************************
FILE PRTFL01 PRINTER FB(133 0)
*******************************************************************
FILE PERSNL FB(571 5710)
IN-AMT 5 02 N
IN-COMP 1 02 A
IN-dept 3 02 A
*
JOB INPUT PERSNL NAME FIRST-PROGRAM
PRINT PAY-RPT
REPORT PAY-RPT LINESIZE 132 PRINTER PRTFL01 NOADJUST
SEQUENCE IN-COMP IN-DEPT
CONTROL IN-COMP IN-DEPT
SUM IN-AMT
TITLE 01 ' REPORT TALLY . '
LINE 01 IN-COMP IN-DEPT IN-AMT
*******************************************************************
FILE PRTFL01 PRINTER FB(133 0)
*******************************************************************
FILE PERSNL FB(571 5710)
IN-AMT 5 02 N
IN-COMP 1 02 A
IN-dept 3 02 A
*
JOB INPUT PERSNL NAME FIRST-PROGRAM
PRINT PAY-RPT
REPORT PAY-RPT LINESIZE 132 PRINTER PRTFL01 NOADJUST
SEQUENCE IN-COMP IN-DEPT
CONTROL IN-COMP IN-DEPT
SUM IN-AMT
TITLE 01 ' REPORT TALLY . '
LINE 01 IN-COMP IN-DEPT IN-AMT
Only control totals are required after company change and dept change.
Did not understand the working of sum control and sequence together. Please advice.