Dear SAS support Communities
My goal is to have all output from SAS printed in one window, instead of two windows.
The current default is that all output is printed to both the log and results viewer, but I would like all output to be printed to the log (or everything to the output-window).
By 'output' I mean:
The reason for this goal is that it would give me more screen estate, because 2 windows take up less space than 3 windows.
PS: Printing everything to the output-window instead of the log would also suffice.
PS: I am using SAS 9.4 for Windows
Could you please clarify this:
The current default is that all output is printed to both the log and results viewer
By 'output' I mean:
- The text that is usually printed to the log (warnings, errors, notes, messages)
- ...AND the text/html that is usually printed to the 'results viewer' (e.g. the output of 'proc sql; select * from sashelp.class;quit; )
That would not be the default I have seen in over 9 centuries of SAS usage. Do you really mean that log and also PROC outputs goes both places (and so is duplicated), or do you mean that LOG text goes to the LOG window, and the output goes to the OUTPUT window?
afaik no, this is not possible.
I don't know how to re-direct both LOG and OUTPUT to the exact same window. I am skeptical this is a good idea anyway, if you don't want to see a window, you can just minimize it; and if everything is in one window then scrolling and finding the log or the output you want takes longer and could be more confusing.
You can redirect both the log and output to the same output FILE as follows (note, that nothing will be written to both the LOG window and OUTPUT window when you do this, and the Results window will not be able to point you to your output, which all seem like major disadvantages to me...)
proc printto log="myfolder\pm.txt" print="myfolder\pm.txt"; run;
/* NOTE: both LOG= and PRINT= point to the same file */
ods html close;
ods listing;
proc sql;
select * from sashelp.class;
quit;
proc printto; run; /* This turns off the re-direction of LOG and OUTPUT to the same file */
So, you can redirect either the log or the output (or both), which gives you a plethora of choices, one of which might work better for you than having both log and output in the same window or file.
Just program one of the function keys (or any other programmable key) to open the LOG, PGM or OUTPUT window.
Personally I normally keep them all full screen and just toggle between them.
Use the KEYS window to change how you have programmed the keys.
Don't know. There is a one click button on the screen to do that however. Pretty standard feature of all windowing systems.
The DMS command is ZOOM. So ZOOM OFF goes back to default size. ZOOM ON goes to full screen.
Map those commands to any available key using the KEYS command.
My workflow is simply I minimize or maximize windows as needed. Also, as pointed out by @Tom you can switch from one window to another with keyboard shortcuts, which you can assign if you don't like the defaults, and I do this as well.
I find having a working Results window is very helpful, if I am running a string of PROCs and each one writes to the OUTPUT, I can simply use the Results window to go directly to the outputs from the third PROC in the sequence, if that's what I want to do.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/hostunx/n16ui9f6dacn8pn1t0y2hgxgi7wa.htm
Have you tried line mode? Particularly when you are developing and debugging code, line mode can be helpful.
Hello @rasmuslarsen
I agree with @WarrenKuhfeld . This gives you something very close to R console.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.