Joy's solution is the simplest based on the sample data you provided. The solution you wanted are highly dependent on the data sturcture. Base on your descripton, you have 1.62 million rows and 1536 unique ID. Therefore, you have about 1055 observations for each ID. Was your purpose to create a data with
1536 rows and 1055 columns or 2110 columns?
Please give more details before anybody can really help you.
hehe, common problem in asking question: when you simplify your question, sometimes it's too simple <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
data final(keep=y1-y3072);
array y y1-y3072;
retain y1-y3072 ;
set ahuige;
by id;
n+1;
y(n*2-1)=x1;
y(n*2)=x2;
if last.id then
do;
output;
n=0;
do i=1 to 3072;
y(i)=.;
end;
end;
run;[/code:73dbe]