Hi,
I have a file (lrecl=10,recfm=fb) containing several records.
What I want to achieve is to count records with the same value in position 6 and 2 long.
At the same time I want another field in the output file where you multiply the sum of counted records with 4.
Yet another field in the output file I want is to divide by 2 and rounded up.
So far I've managed to do the counted records in SYSIN-statement but not the multiply/divide-statements.
//SORTIN DD *
ABC1233ABA
ABD1233ABA
BBB2233BBA
ABD1244ABA
BBB1244BBA
CCC1244CCC
//SYSIN DD *
INREC FIELDS=(6,2,7X)
INCLUDE COND=(10,1,CH,EQ,C'A')
SORT FIELDS=(1,2,CH,A)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,2,
TRAILER3=(1,2,COUNT=(EDIT=(IIIIIIT))))
This result in the file
33 3
44 2
But I want (*4) (/2)
33 3 12 2
44 2 4 1
Suggestions?
Micke