SAS Tip: Use SAS DM Commands to Save and then Clear Your SAS Log (Daily tip for 2024-May-06)


SAS DM (display manager) commands can be used to call windowing and text editor commands within a SAS program. In this example, the log is saved to a permanent file, and then it is cleared:

 

***put something in the log;
proc print data=sashelp.flags (obs=1);
run;

***save the log to a permanent file, overwriting if necessary;
dm 'log; file "C:\My files\log 1 &sysdate9..log" replace';

***Clear the log window;
DM "log; clear; ";

This tip was originally published by Mary Rosenbloom on sasCommunity.org.

 

READ this complete tip   Visit a random SAS tip

Start a topic
About these Tips
A "SAS tip" is a basic unit of information exchange between SAS users. The tips on this board come from sasCommunity.org, from SAS user conferences, from SAS blogs, and from freelance contributions from SAS users like you. We hope that you're able to always learn something new here!


» How you can contribute


Tip-o-meter: 63 tips