In reply to Nega.

Don't change the definition of the RandBetween macro. Just call it with your parameters:

%macro RandBetween(min, max);
(&min + floor((1+&max-&min)*rand("uniform")))
%mend;

data Want;
do i=1 to 100;
Cbsa_codeR = %RANDBetween(10180, 49740);
output;
end;
run;

proc print; run;