i need to include this condition:
1) Total no.of records per combination of field1 and field3 (INCLUDE=(1,2,8,3,CH,A)
INPUT FILE: FIELD1 AND FIELD3 have 5 combinations,if you see in example below
field1 field2 field3 field4
AA 00000 123 ABC
AA 00000 123 ABC
AA 00000 456 ABC
BB 00000 123 ABC
BB 00000 123 ABC
BB 00000 789 ABC
AA 00000 567 ABC
OUTPUT FILE: gets 5 rows, one for each combination, gives no.of occurrences for it
FIELD1 FIELD3 COUNT-OF-COMBINATION
AA 123 2
AA 456 1
AA 567 1
BB 123 2
AA 789 1
My method is:
//SYSIN DD *
SORT FIELDS=COPY
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(1,2,'ON',8,3,'=',COUNT=(M11,LENGTH=10)))
/*
Answer i got is:
AA ON 123 = 7
which is wrong: its should have been
AA ON 123 = 2
AA ON 456 = 1
AA ON 567 = 1
BB ON 123 = 2
AA ON 789 = 1