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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.