I have a dataset with a variable animal type(example). There are 30 animals overall and any row might have any number of animals: Big cat; Tiny strong dog; White pony Big cat; White pony; Small rabbit; Tiny strong dog; White pony I need to separate these into as many columns as required for a particular row. There is no restriction of keeping one column for one animal type. I am using the below code but there are multiple rows being generated along with multiple columns and these columns are empty. data want; set have; array var(30); do i=1 to 30; var(i)=scan(Animal,i,";"); end; run; Please advise. SAS EG version: 7.15
... View more