data have;
input id var $20.;
datalines;
1 A,B,C
2 D
3 E,F
;
data want(keep=id newvar);
set have;
do i=1 to countw(var, ',');
newvar=scan(var, i, ',');
output;
end;
run;
data have;
infile cards dlm=' ,' truncover;
input id var : $40. @;
do while(not missing(var));
output;
input var : $40. @;
end;
datalines;
1 A,B,C
2 D
3 E,F
;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.