Without knowing how this is going to be used and which assignment makes sense for some I would start with this.
data have;
do x = -200 to 3000;
output;
end;
run;
proc sql;
select max(x) into : max from have;
select min(x) into : min from have;
quit;
data buckets;
set have;
bin = floor((x-&min)/((&max-&min)/10000)) + 1;
run;
Note that with a range of -200 to 3000 if your values are integers you are not going to use all 10,000 bins. Ever. You only have 3200 values if integer valued so roughly two thirds of the bins will receive no assignment.
... View more