1

I have some sas code:

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, but i need the results window not open. I have tried noprint in the proc freq but this stops the code executing at all.

Any ideas?

Thanks in advance!!

Sunny
  • 35
  • 1
  • 1
  • 8
  • try running this first: `ods _all_ close;` – Allan Bowe Sep 04 '17 at 17:08
  • Or figure out which destinations are open besides CSV and close them. `ODS LISTING CLOSE;` and then reset after the macro. FYI-it's weird to output PROC FREQ to a CSV file. Is there a reason you're not using an Excel file or something more suitable to formatted output? – Reeza Sep 05 '17 at 01:43
  • ods _all_ close; works but still opens a results tab which is blank. Any way where no results tab opens either. I want to schedule the job, and cannot have a results tab opening in this case – Sunny Sep 06 '17 at 14:07
  • How are you "scheduling a job" that could possible open a results tab? – Tom Sep 06 '17 at 15:01

1 Answers1

0

ods results off; ods results on;

above worked for me. Stopped the results tab opening.

Sunny
  • 35
  • 1
  • 1
  • 8