Greetings: I have a dataset like the following: Date Days Var1 ..... Var10 1/1/2011 10 5 1/2/2011 15 8 1/3/2011 12 3 1/4/2011 3 6 9 1/5/2011 5 9 3 1/6/2011 6 11 2 1/7/2011 4 12 2 1/8/2011 7 9 6 I would like to sum the values of each variable in the array Var1 - Var 10 using the number of days in the cycle (variable is named 'Days'). Such that I could produce the following dataset as output: Date Days Var1 ...... Var10 Cycle_Sum_Var1.... Cycle_Sum_Var10 1/1/2011 10 5 1/2/2011 15 8 1/3/2011 12 3 1/4/2011 3 6 9 33 20 1/5/2011 5 9 3 52 28 1/6/2011 6 11 2 63 30 1/7/2011 4 12 2 38 16 1/8/2011 7 9 6 74 33 Your suggestions are much appreciated! I know proc means, basic arrays and some do loops, etc. I'm not sure if a Macro or Proc SQL is called for in this situation.
... View more