Hi all,
I want to create multiple datasets based on variable 'x' value.
The below example shows how to create the datasets using IFthen. But there are more than 200 disnict values of 'x' in the Real dataset, hence I need a more efficient way of doing it rather than specifying individual If Then.
data test1;
input x;
datalines;
2
3
2
1
2
1
3
;
run;
data out.temp1 out.temp2 out.temp3;
set test1;
if x eq 1 then output out.temp1;
if x eq 2 then output out.temp2;
if x eq 3 then output out.temp3;
run;
Thanks for your help,
Amit