Could you use one macro variable for the name of the data set and the distribution?
The following is an example (if it shows up) of using one name to generate the sample.
%macro generate_random_sample(distribution, sample_size);
data &distribution;
if upcase("&distribution.")='NORMAL' then do; do i=1 to &sample_size; response=rand('Normal',0,1); output; end; end;
else if upcase("&distribution.")='BINOMIAL' then do; do i=1 to &sample_size; response =rand('Binomial', 0.5, 1000); output; end; end;
run;
%mend;
%generate_random_sample(Normal, 50);
%generate_random_sample(Binomial, 50);
... View more