Hello valued SAS experts, I am facing the challenge described below and would appreciate an approach/idea on how to solve the problem. My dataset have looks like this: data have;
input
ID $
;
datalines;
VW
1
2
3
4
5
BMW
6
7
8
9
10
;
run; In the target dataset want there should be a new variable CAR_BRAND which should be created based on the ID according to the following rule: Always fill the variable CAR_BRAND with the last non-digit string from the variable ID. Accordingly, the dataset want should look like this at the end: data want;
input
ID $
CAR_BRAND $
;
datalines;
VW VW
1 VW
2 VW
3 VW
4 VW
5 VW
BMW BMW
6 BMW
7 BMW
8 BMW
9 BMW
10 BMW
;
run; Thanks in advance for the help/ideas!
... View more