How to split raw_variable into multiple variables of lengths 20 and not to break a word.
i.e in below example "acerbic soluable dio" is not the way to split it. dioxide;zinc goes to other variable and so on.
raw_variableacerbic soluable dioxide;zinc titanium
Raw_var1 Raw_Var2 Raw_var3acerbic soluable dioxide;zinc titanium
Thanks for the help!
It would be simpler to split up your string into single words. One could then still concatenate the words back into strings of up to 20 characters.
If re-concatenating words: Do you really need the semicolon in Raw_Var2 or could we just add a blank here?
What should happen if a single word has more than 20 characters?
In fact the delimiters are semi-colons. So they are required.
acerbic;soluable;carbon dioxide
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.