Possible Duplicate:
SAS proc SQL and arrays
I am trying to calculate the ratios of multiple columns, multiple times in SAS using SQL. For example, I want:
(((start*start_period)+(middle*middle_period)+(end*end_period))/number_days) AS azmonth;
The problem is that while start_period, middle_period, end_period, and number_days are constant and start, middle, and end are one set of about 7 sets that need to be multiplied in the same way. Is there a way besides typing it out for each of them?
- Start_per Mid_per End_per Start1....Start20 Mid1...Mid20 End1...End20
- .3--------------.6----------.1------10-------15------26-------45-----61------08
I know I can do a seperate equation for each of the Start, Mid, and Ends but i was hoping there was a way I could do it without having to copy/paste edit al of them individually?