I am using SAS Enterprise Guide to run simulations with PROC GLIMMIX. I don't want the results for the thousands of runs to show up in the default SASReport destination and I need to write the random solution to a SAS dataset. No problem, this code does the trick:
ods results OFF;
proc glimmix; by simulationN; model y = x; random r / s; ods output SolutionR=SRout; run;
ods results ON;
However, if I add any code outside of of the RESULTS ON/OFF block, the effects of ODS RESULTS OFF is negated. For example, if I want to obtain the mean of random estimates and use PROC SQL to calculate that, the results of all 1,000 simulations will be pushed to ODS SASReport which takes a while to write.
ods results OFF;
proc glimmix; by simulationN; model y = x; random r / s; ods output SolutionR=SRout; run;
ods results ON; proc sql; select mean(Estimate) from SRout; quit;
Is this a normal SEG behavior or am I missing something?
I cannot use ODS SELECT NONE / EXCLUDE ALL or NOPRINT option because that suppresses the writing of the SolutionR to SAS dataset.
The work-around I use is to use ODS _ALL_ CLOSE before PROC GLIMMIX and then re-enable ODS TagSet.SASReport File=EGSR afterwards. But I would like to understand this strange behavior of ODS RESULTS commands?
Thank you in advance!
... View more