What does your desired result look like? Do you want an observation for each split or?
Ok. Do you have more than one observation in your actual EX Data set?
Data EX;
Name='jhonson Peter clerk audits cinema movie running';
Run;
data want;
set ex;
length want _want $ 100;
do i=1 to countw(name,' ');
temp=scan(name,i,' ');
_want=want;
want=catx(' ',want,temp);
if length(want)>11 then do;want=_want;output;want=temp;end;
end;
output;
drop temp _want i;
run;
Give an example of what you want if you have a name like "Bartholomew" instead of "Peter" ... something that is longer than 10 characters in a single word.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: