data new;
set sashelp.class;
run;
How to take last two letters from string for name variable?
like this
data _NULL_;
string = 'SomeString';
last_two = substr(trim(string),length(trim(string))-1);
put last_two;
run;
@PeterClemmensenThank You
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.