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
;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!