Hi all, I'm sure this is answered somewhere else but I can't seem to find it, so I'll ask here. I'm new to SAS and am having trouble converting a char data variable to a numeric one. The variable in question is a list of data all formatted as a mix of character: 002AB0001, 002AB0002, 002AB0003 and so on). I am hoping to change it to only the last 4 digits (ex: 0001, 0002, 0003). Any suggestions on the proper code for this? I've tried a few commands, including the one below, but am not sure how to specify to SAS that I'm interested in the last 4. Thank you all failed attempt: data new_set; old_var = "002AB0001"; numeric_var = input(old_var,4.); run;
... View more