Agree with - sounds like your "AB" variable is character, in which case your data step will need to convert it to a numeric using the input() function.
data MyOutputData;
set MyInputData; /* Which contains the (presumably character) variable AB */
format ab BEST15.; /* Your choice of format is actually irrelevant for this exercise */
ab_num = input(ab,best15.); /* Note: The INFORMAT you choose will depend on the character "layout" - I've guessed BEST. here);
drop ab; /* Optional */
run;
proc summary..... etc.
If this does not help, please post the results of a PROC CONTENTS, plus the first few rows of a PROC PRINT of the AB variable.