Here is another way, similar to @Reeza transpose, but done in a single step. I call the approach 'extrusion' because I envision pushing down the data set and the values get pushed to the right..
data want(keep=list);
set months end=done;
array months(12) $5 _temporary_;
months(_n_) = quote(mon,"'");
if done;
list = catx(',', of months(*));
run;
... View more