BookmarkSubscribeRSS Feed
smilingmelbourne
Fluorite | Level 6
Hi everyone,

How can I clear the SAS logs automatically so I don't have to sit at my desk to click the "Clear" option on the message window everytime the logs get full?

I've tried the following but still the windows keep coming up for me to choose either of the options.

filename templog "C:\Research\DataCollection\tempsaslog.txt";
proc printto log templog;

"my program code"

proc printto log = log;
run;

Can you please advise?
6 REPLIES 6
Reeza
Super User
I think you might have your code in the wrong order.
proc printto goes before your sas program statements or you're missing an equal sign.




The following code redirects my log in SAS 9.2 (from the documentation).

*set log to temp file;
filename myfile 'c:\temp\mylog.log';
proc printto log=myfile;
run;

proc print data=sashelp.class;
run;

*reset log output;
proc printto;
run;
Bill
Quartz | Level 8
if you have fully debugged your code, you could add the following option to suppress much of the log output:

options nosource nonotes; You will still get warnings and error messages.
ballardw
Super User
If you are using F8 or other key to submit your job, you could change the entry in the KEYS menu item to: Log;clear;submit;log;

This will clear the log before each program submitted.
bluemountains
Obsidian | Level 7

Where do I find the Keys menu?? I am using SAS studio edition

SASKiwi
PROC Star

There is no KEYS window in SAS Studio as function keys are not customisable.

smilingmelbourne
Fluorite | Level 6
Wow, that's so wonderful! Thank you all for the help. Now I know several ways to clear the SAS logs 🙂

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 36570 views
  • 2 likes
  • 6 in conversation