First off, my apologies for the lame question perhaps lack of sleep, tiredness or whatever.
Ok question, from sas function documentation
charlist
specifies an optional character expression that initializes a list of characters. This list determines which characters are used as the delimiters that separate words. The following rules apply:
By default, all characters in charlist are used as delimiters.
If you specify the K modifier in the modifier argument, then all characters that are not in charlist are used as delimiters.
Tip: | You can add more characters to charlist by using other modifiers. |
where is the charlist list in sas documentation? This irks me
You specify the charlist, any characters you want.
I have found a few in SAS help but never found a full list.
You specify the charlist, any characters you want.
Thank you @PaigeMiller That's the doc i needed. Hmm the answer i wanted was right there viz.
And why the problem arose was thanks to this :
when i desired (1995)
1013 data _null_;
1014 k='Toy Story (1995)';
1015 k1=scan(k,-1);
1016 put k1=;
1017 run;
k1=1995
and it's pretty apparent, the explicit charlist specification was needed
data _null_;
k='Toy Story (1995)';
k1=scan(k,-1,' ');
put k1=;
run;
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.