BookmarkSubscribeRSS Feed
rasmuslarsen
Obsidian | Level 7

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 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; )

 

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

19 REPLIES 19
PaigeMiller
Diamond | Level 26

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?

--
Paige Miller
rasmuslarsen
Obsidian | Level 7
You are right. The default is that LOG-text goes to the log window, and the output-text goes to the output window.

Basically I want the output of things like 'proc sql; select * from sashelp.class;quit;' to go to the log.

Is this possible?



andreas_lds
Jade | Level 19

afaik no, this is not possible.

PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
rasmuslarsen
Obsidian | Level 7
Thanks.
Coming from R, I am used to (mainly) only having two windows: (1) script and (2) console (which prints results as text and the equivalent of the SAS-log). With my background having 3 windows open at the same time in SAS takes up screen estate, and seems unnecessary, I am used to having everything printed to one window. I could also just minimize the results or log window, but opening it or switching to it disturbs my work flow (reaching for the mouse or Ctr-tabbing though to the right window). But maybe my I am using it wrong? How is your setup, and how do you avoid these problems?
Tom
Super User Tom
Super User

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.

image.png

rasmuslarsen
Obsidian | Level 7
Thanks. Is it possible to create a shortcut to maximize the current window? E.g. the results-window or the log-window?
Tom
Super User Tom
Super User

Don't know.  There is a one click button on the screen to do that however. Pretty standard feature of all windowing systems.

rasmuslarsen
Obsidian | Level 7
Thanks, yes I know 🙂 But I would like to avoid using the mouse.
For those interested i found the shortcut for in Windows 10 for maximizing 'internal' windows (e.g. the results window, which is 'internal' to the SAS-window):
[Alt] + [-], [x].
Tom
Super User Tom
Super User

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.

rasmuslarsen
Obsidian | Level 7
Great, thanks! 🙂
PaigeMiller
Diamond | Level 26

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.

 

 

--
Paige Miller
WarrenKuhfeld
Ammonite | Level 13

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.

Sajid01
Meteorite | Level 14

Hello @rasmuslarsen 

I agree with @WarrenKuhfeld . This gives you something very close to R console.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 19 replies
  • 3265 views
  • 9 likes
  • 7 in conversation