Or another method that uses the same function but a macro approach is:
%macro out_alphas();
%do i = 1 %to 26;
%let dsn = %sysfunc(byte(%sysfunc(rank(a)) + &i. - 1));
Proc sql;
Create table _&dsn. As
Select * from sashelp.class
where lowcase(substr(name,1,1)) = "&dsn.";
quit;
%end;
%mend;
%out_alphas;