Hi,
Good evening!
Please help me out regarding below data
INPUT:Record length 28
emp id field 1 ind1 field 2 ind2 field 3 ind3 field 4 ind4
1234 10.20 Y 30.21 Y N 13.00 Y
1235 10.20 Y 30.21 Y 12.3 Y 13.00 Y
1236 10.20 Y 30.21 Y 2.1 Y 13.00 Y
1237 N 30.21 Y 11.34 N 13.00 Y
I want output should be like below using sort.
emp id field 1 ind1 field 2 ind2 field 3 ind3 field 4 ind4 TOTqty tot ind avg
1234 10.20 Y 30.21 Y N 13.00 Y 53.41 3(y+y+y) 17.80
1235 10.20 Y 30.21 Y 12.3 Y 13.00 Y 65.71 4(y+y+y+y) 16.4275 (if possible rounded to .43)
1236 10.20 Y 30.21 Y 2.1 Y N 42.51 3(y+y+y) 14.17
1237 N 30.21 Y 11.34 N 13.00 Y 54.55 3(y+y+y) 18.18333(if possible rounded to .19)
Please help me out with syntax.
i used
SYSIN DD *
INREC OVERLAY=(29:5,5,add,11,5,add,18,5,add,24,5,ZD,TO=ZD,LENGTH=8
I AM NOT SURE FOR IND SUM AND AVERAGE.Please Help me out.
Thank you.