BookmarkSubscribeRSS Feed

Or allow the following that might do a similar thing.

proc printto print=log; run;

 

The idea is that some procedure output that you make in SAS is "administrative".  Like output to the log, a proc print can create information dealing with the SAS environment or files sizes and file dates, for example.  This can inform users for debugging purposes or for showing the state of the SAS system at the time of running just like log output.  If this information works like log information why not allowed users to send the text stream to the log.

 

This can be done in batch mode,

https://communities.sas.com/t5/Base-SAS-Programming/Piping-output-listing-to-log/m-p/413020#M101047

  • ODS
3 Comments
ballardw
Super User

And the actual justification for this is what?

 

I think I can guess but your should provide a reason why the SAS institute should invest resources in this project.

 

With the, I suspect vast, numbers of people using/preferring one of the ODS destinations the reason is very important. Especially since a fair amount of my output looks like trash in Listing, or won't ever fit.

PhilC
Rhodochrosite | Level 12

because it would most likely be easy..  and I'm sure I wouldn't put a fair amount of your output in my log files either...,  but this has been figured out for Batch mode. 

 

https://communities.sas.com/t5/Base-SAS-Programming/Piping-output-listing-to-log/m-p/413020#M101047

 

What about Enterprise Guide , SAS Interactive, and beyond? 

Quentin
Super User

I like this idea.  Every few years I think something like 'proc printto print=log' will work, spend 15 minutes trying to get it working, then give up.  I have plenty of occasions where I want to report information about the SAS session to the user (list of work data sets with record counts, macro variables that exist, etc.), and I want the information to be written to the log.  I usually end up resorting to using a data _NULL_ step and PUTLOG statements, but if I could redirect output to the log and do a simple PROC PRINT life would be much easier.

 

If this option were turned on for the SAS sesssion, it would let the log become something like simplified Jupyter noteook output, displaying both log text and results text.  Could be useful for instruction, forum posts, and paper writing.