PLEASE format your code when posting.
pp2014 wrote:
Above example does convert to numeric but keeps Zeros.
It doesn't on my system, and you're using implicit conversion which will leave a note in your log.
Obs Var1_new Var1
1 1234 00001234
Use explicit conversion instead, via the input function To remove leading zeros but retain as a character variable you can either use regular expressions to remove leading zero's or use put/input.
data a1;
format Var1_new 11.;
Var1 = "00001234";
Var1_New = input(var1, 11.);
var1_Char = put(input(var1, 11.), $11. -l);
run;
proc print data=a1;
run;
Obs Var1_new Var1 Char
1 1234 00001234 1234