BookmarkSubscribeRSS Feed
GreggB
Pyrite | Level 9

i submitted the following statement so that the default html output would clear with each procedure.  ods html newfile=proc;

Now I can't turn it back on.

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:

  I'm not sure what you want to turn back on??? You might try:

ods _all_ close;  /* closes all open destinations */

ods html;         /* reopens the cumulative HTML file with default options*/

in order to turn the cumulative HTML file back on. Or, you can close SAS, reopen SAS and make sure that the Tools-->Options-->Preferences-->Results choices are set appropriately, as described here: http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p0sq3tdxedxfd1n1w8... and here

http://support.sas.com/kb/43/911.html and here: http://support.sas.com/kb/23/657.html

Or, you can choose what I call the "full control" method, that gives you control over the location of your output and the name of the file(s) generated, by using an ODS "sandwich" explicitly. In the first example, 2 of the procedures will have their output sent to the my_two_results.html file and the 3rd procedure will go to a different location and file named reportNov.html -- in this way, you know exactly how what output is being written and the location to which it is being written.

cynthia

ods _all_ close;

 

ods html file='c:\temp\my_two_results.html';
  
proc print data=sashelp.class;
run;

      

proc freq data=sashelp.shoes;
  tables region;
run;
ods html close;


ods html file='q:\backup\reportNov.html';
  proc print data=sashelp.shoes;
  run;
ods html close;

Rick_SAS
SAS Super FREQ

If you are trying to clear the HTML destination, here's one way to do it in SAS 9.3: http://blogs.sas.com/content/iml/2011/08/29/how-to-clear-the-output-window-in-sas-9-3/

ballardw
Super User

If part of the issue is that restarting HTML output has files going into an "active" folder that isn't the one you want this may be of help. The first part of the code gets the location of the WORK library as a good place to put temporary files. Then the ODS HTML PATH= restarts HTML output and places the temporary HTML files in that library.

proc sql noprint;

select trim(path) into :workpath from dictionary.libnames

where libname='WORK';

quit;

%let workpath=%trim(&workpath);

ods html path="&workpath";

Ksharp
Super User

Hi. ballardw

It could be more simple:

%let workpath=%sysfunc(pathname(work));

%put &workpath;

Ksharp

ballardw
Super User

Hadn't found the PATHNAME function. Thanks for pointing that out.

gfarkas
Calcite | Level 5

Probably can just simplify it even more with:

ods html path="%sysfunc(pathname(WORK))";

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1948 views
  • 0 likes
  • 6 in conversation