Kurt - thank you very much. It worked great. Each pair of seed1, seed2 has a student's name associated with it. I want to add in the student's name and have the program print out the seed1, seed2 and name as well as the proc means for the data that are generated for each student. In the code below, I used title &seed1 &seed2 before the proc mean and it worked (altho I am sure there is probably a better way), but when I add in name it doesn't print the name. I made a number of attempts, but am quite unfamiliar with call execute . any ideas? thanks again!
options ls=78 formdlim='*' nodate nonumber nolabel; ods listing;
%macro xone(seed1,seed2,name);
data samples; do samp = 1 to 10; do t = 1 to 100; u = rannor(&seed1)*5; x = 100 + 3*rannor(&seed2); y = 10 + 0.5*x + u; output; end ; end; run;
title &seed1 &seed2 &name; proc means; %mend;
data _null_; input seed1 seed2 name $; call execute('%xone(seed1='!!put(seed1,best.)!!',seed2='!!put(seed2,best.)!!',name);'); cards; 1234 4567 Doyle 1117 7111 Boyce
; run;
... View more