* 03c - Random samples; libname y "y:\sas\data"; * Approximate sample; data approx; set y.cake; pick = ranuni(-1); /* use a negative seed to get a different sample each time*/ if pick <= 0.5; run; proc print; run; * Exact sample; data exact; set y.cake; pick = ranuni(-1); run; proc sort data=exact out=new; by pick; run; data exact; set new(obs=10); run;