BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alvinyxm
Calcite | Level 5

This statement causes SAS to create html file in the directory of the sas code file, but default is only to view the output in SAS windowing environment. Does anyone know how to restore the default without closing SAS and reopening it? What option should I add to the statement? I just want to view the output in SAS windowing environment but no output html  file.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
What you see in the Results Viewer is ALWAYS a local file. The issue is that WORK goes away when you close SAS and so it doesn't seem "LOCAL". In the Tools--> Options --> Preferences --> Results window, there is also a checkbox to open the file as soon as it is created. If this is "ON" or checked, then your file will automatically open in the Results Viewer. If this box is "OFF" or unchecked, then you have to double click in the Results Viewer to see the file. It is this checkbox that controls when the file "pops open" or not.

When I work, because I so often create several outputs (because I am comparing the HTML results to the RTF and/or PDF results), I always turn that button OFF, so I can double click to see the output I want. It makes me crazy to have the HTML pop open, then the RTF pop open and then the PDF pop open -- so I just click on what's in the Results Viewer.

Everybody works differently. Your output is either in WORK or it is in your default working storage location (possibly something like c:\users\xxxyyy\My Documents\My SAS Files\ -- the advantage of having the output in WORK is that it goes away and you don't have to clean up the other location. I am a "full control" person however, so I actually turn off everything in the "automatic" creation department and I use ODS HTML with FILE= about 95% of the time.

When we first transitioned from "always LISTING" to "always HTML" in SAS 9.3, I wrote this paper...it shows the code method for much of what you want to do, but the minute you issue an ODS _ALL_ CLOSE; or an ODS HTML CLOSE or an ODS HTML; in your code, then you are changing how the defaults work.

This may help you: https://support.sas.com/resources/papers/proceedings12/250-2012.pdf

Keep in mind that there are some differences between the behavior in SAS 9.3 and SAS 9.4. Notably, in SAS 9.4 there is now a working DELETE button for the Results Window, which is wonderful - -because it clears the cumulative file that was being created. I still prefer the "full control" method that I show in the paper, but perhaps it will help you.

cynthia

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
ODS HTML should allow you to see the file in the Results Viewer, but the name will be some default name. I am not sure what you mean by "restore the default". Try going to
Tools --> Options --> Preferences --> Results tab and make sure that listing is off and then make sure that "Create HTML" is checked and that WORK (as the location) is also checked. And then, this should restore your output creation to the default set for SAS.

You can use ODS HTML, but with a path= like this:
ods html path="%sysfunc(pathname(WORK))";

should have the same end result as using the Tools --> Options --> Preferences path in the Display Manager interface.

cynthia
alvinyxm
Calcite | Level 5

Hi,

 

Thanks for the reply. By "restore the default", I mean that SAS will only create an output in the Results Viewer, but no local file will be created. However, if you do write:

ods html;

SAS wll not only allow you to see the file in the Results Viewer, but also create a local file which I do not need. I don't know what option I should add to avoid a local html file being created.

 

I know by doing "Tools --> Options --> Preferences --> Results tab and make sure that listing is off and then make sure that "Create HTML" is checked and that WORK (as the location) is also checked.", I can restore the default, but I don't know how to write code to achieve that. It seems that there is always local html file being created. Do you know what option should be used to avoid a local html file being created?

Cynthia_sas
SAS Super FREQ
What you see in the Results Viewer is ALWAYS a local file. The issue is that WORK goes away when you close SAS and so it doesn't seem "LOCAL". In the Tools--> Options --> Preferences --> Results window, there is also a checkbox to open the file as soon as it is created. If this is "ON" or checked, then your file will automatically open in the Results Viewer. If this box is "OFF" or unchecked, then you have to double click in the Results Viewer to see the file. It is this checkbox that controls when the file "pops open" or not.

When I work, because I so often create several outputs (because I am comparing the HTML results to the RTF and/or PDF results), I always turn that button OFF, so I can double click to see the output I want. It makes me crazy to have the HTML pop open, then the RTF pop open and then the PDF pop open -- so I just click on what's in the Results Viewer.

Everybody works differently. Your output is either in WORK or it is in your default working storage location (possibly something like c:\users\xxxyyy\My Documents\My SAS Files\ -- the advantage of having the output in WORK is that it goes away and you don't have to clean up the other location. I am a "full control" person however, so I actually turn off everything in the "automatic" creation department and I use ODS HTML with FILE= about 95% of the time.

When we first transitioned from "always LISTING" to "always HTML" in SAS 9.3, I wrote this paper...it shows the code method for much of what you want to do, but the minute you issue an ODS _ALL_ CLOSE; or an ODS HTML CLOSE or an ODS HTML; in your code, then you are changing how the defaults work.

This may help you: https://support.sas.com/resources/papers/proceedings12/250-2012.pdf

Keep in mind that there are some differences between the behavior in SAS 9.3 and SAS 9.4. Notably, in SAS 9.4 there is now a working DELETE button for the Results Window, which is wonderful - -because it clears the cumulative file that was being created. I still prefer the "full control" method that I show in the paper, but perhaps it will help you.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1460 views
  • 1 like
  • 2 in conversation