Hi everyone, I keep getting errors when I run the following program. Dataset two has 5 variables, year, var1-var4 and 5 observations. The dataset one that I am trying to create should have 20 observations with variables year, gender, color and team. I want to split var1-var4 for for the two genders and 2 colors and do the same for each of the five years(2016-2012). But everytime i run this program i get an error that the array subscript is out of range. It feel like I am making a logic mistake somewhere but am not able to figure out where. data one; set two; array tm (*) $ var1 var2 var3 var4; do year=2016 to 2012 by -1; do gender="Male","Female"; do color="Red","Green"; team=tm(year); output; end; end; end; run; What I want: dataset one: year gender color team 2016 male red var1 value 2016 male green var2 value 2016 female red var3 value 2016 female green var4 value and so on. Any input is much appreciated. Thanks!
... View more