11-06-2017 03:46 AM - edited 11-06-2017 03:46 AM
I have a dataset like this
ID V1 V2 V3 V4 V5 V6 ..
a2a2a2a2a2a2a2a 19259999999 19269999999 19269999999 19259999999 19279999999 19289999999 ..
I want to split V1, V2...V50 into two variables like this
ID V11 V12 V21 V22 V31 V32
a2a2a2a2a2a2a2a 1925 9999999 1926 9999999 1926 9999999 etc
thansk for all!!
11-06-2017 04:23 AM
First question, why do you have a dataset like that. You won't just find this particular problem harder, you will find all coding with that structure harder. As such your current question makes no sense.
It is however possible:
data want1 (keep=id var1--var10) want2 (keep=id var11--var50); set have; run;
But as I say, it makes no sense. Normalise the data items (so they go down) and then process them as data elements.