data CP;
input time A B;
cards;
1 . .
2 0 .1
2 .4 .7
3 .3 .5
5 .9 0
6 .3 .33
;
I want to create a third and fourth variable calle Asum and Bsum
where Asum= .+0+.4+.3+.9+.3
data CP;
input time A B Asum Bsum;
cards;
1 . . .+0+.4+.3+.9+.3 .+.1+.7+.5+0+.33
2 0 .1 0+.4+.3+.9+.3 1+.7+.5+0+.33
2 .4 .7 .4+.3+.9+.3 .7+.5+0+.33
3 .3 .5 .3+.9+.3 .5+0+.33
5 .9 0 .9+.3 0+.33
6 .3 .33 .3 .33
;