08-09-2011 10:41 PM
I am currently experencing SAS 9.3.
There is one thing I don't know whether it is a bug or sth. can be disabled in the settings, which is:
everytime when I re-run the code, the results from all previous runs will appear in the results viewer as well.
The current results setting is:
HTML; use WORK folder; Style: EGDefault; View result as they are generated;
Use ODS graphics; View results: using internal browser.
Does anyone know how to disable this or could it be a bug ?
Thanks and Regards
08-10-2011 09:56 AM
That may be by design. Your description is not terribly precise, so I am going to guess that you are using interactive SAS and are submitting from the program window. When you do that the log appears in the log window. As you submit more and more, whether it is additional or revisions, the log keeps growing. That happened in 9.2, 9.1, and 8.2. I think that it even happened in version 6. You must clear the log window manually or with DM commands.
If I missed your environment, maybe you can make a more precise description.
08-10-2011 11:33 PM
This Tech Support note explains how the new defaults are set when you use the SAS Windowing Environment (also known as Display Manager).
When you use the default settings (with LISTING or OUTPUT window turned OFF and the HTML destination turned ON), you are creating a cumulative HTML file, and as you noted, it is in the default WORK location (which means that the default HTML file will go away when you close your SAS session). This is nice, if you like working this way, because you have a record of all the output you created throughout a session AND, all the output will use the new HTMLBLUE style (very good looking style). If you want to return to previous behavior, with LISTING turned on and HTML turned off (so that you can take control of creating ODS HTML ODS RTF and ODS PDF output). You have two ways to do that:
1) follow the instructions in the above link and use the Tools-->Options-->Preferences-->Results window method to turn off the cumulative HTML file and turn the LISTING window back on. OR
2) use code to turn off the HTML destination at the beginning of the session and then use code to turn the LISTING destinatiion on -- so all your existing programs will work as you want and, you will NOT have a cumulative HTML file of all your output from a session.
It's up to you how you want to work. If you want a cumulative file with all your job output using the HTMLBLUE style, then give the new mode of working a try. If you have existing code, with existing FILE= and STYLE= options, then having the cumulative file might not be your cup of tea. The code method to turn OFF the default HTML destination in 9.3 is:
ODS _ALL_ CLOSE; /* closes all the open destinations, including the cumulative ODS HTML file */
ODS LISTING; /* turns on the LISTING window */
ODS GRAPHICS OFF; /* turns OFF the automatic use of ODS GRAPHICS, if you are not running ODS GRAPHICS or
do not want to get graphics automatically */
Factors that should inform your decision include how you want to work and the type of development you need to do and whether you need to control the name and location of the ODS files you create, whether you want a cumulative HTML file of all your work in a session, whether you want to allow ODS GRAPHICS to be on so you can see the breadth and quality of the new ODS GRAPHICS output (which is included at no additional cost with your Base SAS license). Once you decide how you want to work, you can adjust your session option accordingly.
08-11-2011 09:48 PM
Thanks for the detailed explanation Cynthia.
I would like to see one result per output rather than cumulative HTML. Is there anyway to disable this while still tick HTML in the Preference setting?
Because if I use "ODS HTML" statement to output results, actual HTML files will be generated and stored in my local directory (not working directory), then I have to delete those unuseful ones manually everytime.
Therefore I would like to know how I can see the results in SAS with HTML one result per output, and without creating actual file in my local directory.
Thanks and Regards
08-12-2011 02:07 AM
You might want to double check with Tech Support, about whether there is a way, in SAS 9.3, to change the default behavior to something other than the cumulative behavior using the automatic checkbox under the Tools menu.
It's easy to control with code, however, since ODS has always allowed you to use the "sandwich" technique to control both the location and/or the name of the output file you created. I am such a control freak, that I always turned OFF that automatic checkbox so I could control the location (put different outputs in different folders) and I always used the FILE= option, so I could explicitly name my output instead of getting sashtml.htm or sasrtf.rtf or saspdf.pdf as the default file names. My method of working was to create output in c:\temp and then when I had the final report the way I wanted, I would change the folder location to my final report folder location. Then I would go back about once a week and delete everything in c:\temp directory.
I wonder, if you want the output to go to WORK, whether this syntax would be acceptable -- I am in the process of installing 9.3 and don't have an opportunity to test the code in 9.3 right now.
*** Possible way to direct ODS output to the WORK location;
*** or otherwise take control of the file path.;
*** You can also control the name of the file with;
*** the FILE= option;
** 1) This will probably get some automatic name;
** I am not sure whether it will be a variation of sashtml.htm or not;
ods html path="%sysfunc(pathname(WORK))";
proc print data=sashelp.shoes(obs=3);
ods html close;
** 2) in this code, you take control of the file name, but;
** send the output to the current WORK physical location;
ods html path="%sysfunc(pathname(WORK))"
proc print data=sashelp.cars(obs=3);
ods html close;
** 3) in this code, you take control of the file name;
** AND the folder location of the output file;
ods html path="c:\temp"
proc print data=sashelp.prdsale(obs=3);
ods html close;