Hi, Thanks for the quick comment. The problem is that Data A contains ID's, but Data B doesn't, so I can't use the BY statement. Anyway, Astounding gave me a way. Thanks again.
... View more
Try this:
proc transpose data=have out=int;
by id;
run;
data want (drop=counter);
set int;
by id;
if first.id
then counter = 1;
else counter + 1;
if counter le 20;
run;
... View more