This kind of data manipulation always makes me consider PROC TRANSPOSE. Not knowing your exact purpose (if we know what you are up to, the answer could be completely different from the beginning), here is one generic approach, I didn't use VIEW which I should, for the sake of better visibility.
options validvarname=any;
data test;
do num=1 to 100;
output;
end;
run;
/*Say you want 7 records per group*/
data step_1;
do i=1 to 7 until (last);
set test end=last;
grp=_n_;
output;
end;
run;
proc sort data=step_1 out=step_2;
by i;
run;
proc transpose data=step_2 out=want(drop=i _name_) let;
by i;
id grp;
var num;
run;