Hi guys,
How to split name as single letters
data ds;
input name $15.;
datalines;
aabbbs
bbssaaf
;
run;
Output:
Name | letter_1 | letter_2 | letter_3 | letter_4 | letter_5 | letter_6 | letter_7 |
aabbbs | a | a | b | b | b | s | |
bbssaaf | b | b | s | s | a | a | f |
Since this is a very simple task for someone who has worked with SAS for several years now, what have you tried so far?
A similar question was already asked here few times e.g.,
or
https://communities.sas.com/t5/SAS-Programming/split-name-as-single-letter/m-p/878153
Try to improve your googling skills 😉
Bart
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.
Ready to level-up your skills? Choose your own adventure.