Hi Guys
Below dataset split into three datasets like alphabet , digits ,special characters
using compress function i do not know exactly scan function can do this scenario
data special_char;
x='abacd123=@7!*#$ ^';
run;
Is there an actual question here?
What is it that you want to do with that dataset?
What should the three resulting datasets look like?
split into three datasets
alphabet digits special characters
You want three datasets? Not three variables (one for each class of character)?
It seems we even have to write your questions for you.
Do you mean to have three datasets, each with a character variable x,
where the first contains
abacd
the second
123
and the third
=@7!*#$ ^
?
You already have everything you need, you just need to use it "the other way round".
So ask yourself first: "what does the modifier string 'ak' do?"
But that code just creates three duplicates of the same dataset.
If 'ka' keeps alpha and 'kd' keeps digits then to get everything else use 'ad' without the k.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.