Editor's Note: Thanks for the excellent solution. I have added a full code version down below.
Combining index- and substr-function seems to be a good start: name = substr(name, 1, index(name, '(') -1); Both functions are well documented: index: http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/a000212242.htm substr: http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/a000212264.htm
data one;
input name $1-24;
cards;
Leeds (212)
Wakefield (213)
Kingston-upon-Hull (215)
N Lincolnshire (216)
;
data two;
set one;
length new_name $24;
new_name=substr(name,1,index(name, '(')-1);
run;
proc print;
run;
... View more