Desktop productivity for business analysts and programmers

proc printto

Reply
Contributor
Posts: 35

proc printto

Is there a way to route the SAS log to both the log window and a text file via proc printto?

PROC Star
Posts: 1,291

Re: proc printto

Don't think there is a way for PRINTTO to send the log to two places at the same time.

But, you could use -altlog to send the log to a file, and then use proc printto to turn writing log messages to the log windows on and off.

Unfortunately, -altlog can only be set at SAS invocation.  I really wish it could be turned on and off during a session.

HTH,

--Q.

Trusted Advisor
Posts: 1,137

Re: proc printto

i tried but i am unable to direct the log information to both the log and to an external file. it is either log or external file, but not both. Me too have a doubt on the same

Thanks,

Jag

Thanks,
Jag
PROC Star
Posts: 1,291

Re: proc printto

If you are using PC SAS, you could also just leave the log going to the log window, then use DM commands to copy the log window to a file.

Something like:

dm "log; file ""c:\junk\mylog.log"" replace;";

Valued Guide
Posts: 3,208

Re: proc printto

You cannot duplicate the sas-log using proc printto. Hmm the same question everytime coming back. 
My guess is there are business policies getting enforced as result of regulations. There must be en evidence who has done what when how.  This is a SIEM question.


---->-- ja karman --<-----
Contributor
Posts: 35

Re: proc printto

The external text file serves at least two purposes.  One is, yes, it is for regulatory and tracking.  Second is technical.  It's relatively easy to mine a text file.  Thanks for the responses.

Valued Guide
Posts: 3,208

Re: proc printto

Thanks for your confirmation on the intended goal of regulatory and tracking. You could have won a battle for going with printto.
I am convinced, with some reasons, you have lost the war by that.

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 6 replies
  • 389 views
  • 6 likes
  • 4 in conversation