SAS - how to stop results tab opening in sas using code.

420 views Asked by At

I have the below code:

ods _all_ close;
ods csv file="filename.csv"
%macro mac_name (st, en=); 
  %do j=1 %to &en.;
  %let k=%eval(&j.+1);
      proc freq data=data_name;
        tables status&j. * status&k. / nocol norow nopercent missing;
      run;
  %end;
%mend;
%mac_name (st=1, en=%sysfunc(week(%sysfunc(today()), u)));
ods csv close;

which works fine.

The only problem is i don't want the results tab to open up, and this has to be done from within the code as i am to schedule the job.

Any ideas?

Thanks in advance!

1

There are 1 answers

2
patrickjlong1 On

If you're not running it in batch, I'd recommend using the ods noresults statement. I've posted a simple, reproducible example using Sashelp.Cars below. This was tested in windows SAS 9.4 only.

ods _all_ close;
ods noresults;  

ods csv file="filename.csv";
  proc print data=Sashelp.Cars; 

  run;

ods csv close; 
ods _all_ close;