If Paige's doesn't work, here is my procedure for multiple executions: data Post_1(keep= x y i);
call streaminit(123);
do i = 1 to 50;
X = rand("Normal",0, 1);
Y = rand("Normal",2, 1);
output;
end;
run;
data Post_2(keep= x y i);
call streaminit(1234);
do i = 1 to 50;
X = rand("Normal",0, 1.1);
Y = rand("Normal",2.1, 1);
output;
end;
run;
data Post_3(keep= x y i);
call streaminit(12345);
do i = 1 to 50;
X = rand("Normal",0, 2.0);
Y = rand("Normal",2.2, 1);
output;
end;
run;
/*CREATE A DATASET OF NUMBERS 1-3. CAN CHANGE TO 100 OR WHATEV.*/
proc sql outobs=3;
create table ids as
select monotonic() as id from sashelp.bmimen;
quit;
%macro findmin(id);
Proc SQL;
select X into :XMinY_%str(&id)
from Post_%str(&id)
having Y=min(Y);
quit;
%mend;
data ids;
set ids;
call execute("%findmin("||strip(id)||")");
run;
... View more