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
Opal | Level 21

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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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