webgu 发表于 2012-11-30 12:45 
You can leverage SAS byte function by mapping random number to ascii number.
1-10 --> ascii table 48-57
11-36 --> ascii table 65 - 90
data demo;
length string $4;
array p[4];
do i=1 to 100;
do j=1 to 4;
p[j]=int(ranuni(123)*36)+1;
p[j]=ifn(p[j]<=10, p[j]+47, p[j]+54);
end;
string=catt(byte(p1),byte(p2),byte(p3),byte(p4));
output;
end;
run;