How to Suppress SAS Log

How to Suppress SAS Log

Post by Sri » Thu, 18 May 2006 23:18:37


All,

I have a long running SAS program that generates a lot of sas log
information in a windows environment. I wanted to find out if there is
a way to suppress the logging or if i could redirect the output the log
to a dummy device.

e.g. redirecting to a /den/null on unix platforms.

Thanks for your help!
 
 
 

How to Suppress SAS Log

Post by tobydun » Thu, 18 May 2006 23:40:23

Sri ,

This is ussually a indication that what you are doing is inefficiently
written. Such as a macro that runs a bunch of proc regs subsetting the data
for each pass through the macro and/or you also have the options mprint
mlogic and symbolgen turned on. I have yet to have the problem that my log
is getting to big. So instead of attacking a symptom of your problem write
back to the list and tell us what you are doing in your code that is causing
you to get such large logs and we can help you come up with a cure for your
problem and not a symptom.



Toby Dunn





From: Sri < XXXX@XXXXX.COM >
Reply-To: Sri < XXXX@XXXXX.COM >
To: XXXX@XXXXX.COM
Subject: How to Suppress SAS Log
Date: Wed, 17 May 2006 07:18:37 -0700

All,

I have a long running SAS program that generates a lot of sas log
information in a windows environment. I wanted to find out if there is
a way to suppress the logging or if i could redirect the output the log
to a dummy device.

e.g. redirecting to a /den/null on unix platforms.

Thanks for your help!

 
 
 

How to Suppress SAS Log

Post by joewhitehu » Fri, 19 May 2006 00:34:49

Sri,

To get some immediate relief for your "symptom", you can redirect the log to a file that you can discard. There are several ways to do this. One way would be to insert a PROC PRINTTO LOG=PATH\FILENAME at the beginning of the job and a null PROC PRINTTO at the end of the job to close the log file which you then could delete. Since I'm aware of the job, I'm prompted to remind everyone not to overgeneralize from limited experience.

Joe
 
 
 

How to Suppress SAS Log

Post by tobydun » Fri, 19 May 2006 00:47:48

Joe ,

Given the poster want to eliminate the log it is as simple as: options
nonotes nomprint nosource nosource2;

But again that I dont think the log file being too big is the problem. I
have written programs that produced enough volume of output to fill up two
of the boxs printer paper comes in and the log wasnt but a few pages long.
Even in the years of my macroitise I never had a log that was so huge I was
tempted to trash it or turn it off.



Toby Dunn





From: Joe Whitehurst < XXXX@XXXXX.COM >
Reply-To: XXXX@XXXXX.COM
To: XXXX@XXXXX.COM
Subject: Re: How to Suppress SAS Log
Date: Wed, 17 May 2006 11:34:49 -0400

Sri,

To get some immediate relief for your "symptom", you can redirect the log to
a file that you can discard. There are several ways to do this. One way
would be to insert a PROC PRINTTO LOG=PATH\FILENAME at the beginning of the
job and a null PROC PRINTTO at the end of the job to close the log file
which you then could delete. Since I'm aware of the job, I'm prompted to
remind everyone not to overgeneralize from limited experience.

Joe
>
> From: toby dunn < XXXX@XXXXX.COM >
> Date: 2006/05/17 Wed AM 10:40:23 EDT
> To: XXXX@XXXXX.COM
> Subject: Re: How to Suppress SAS Log
>
> Sri ,
>
> This is ussually a indication that what you are doing is inefficiently
> written. Such as a macro that runs a bunch of proc regs subsetting the
data
> for each pass through the macro and/or you also have the options mprint
> mlogic and symbolgen turned on. I have yet to have the problem that my
log
> is getting to big. So instead of attacking a symptom of your problem
write
> back to the list and tell us what you are doing in your code that is
causing
> you to get such large logs and we can help you come up with a cure for
your
> problem and not a symptom.
>
>
>
> Toby Dunn
>
>
>
>
>
> From: Sri < XXXX@XXXXX.COM >
> Reply-To: Sri < XXXX@XXXXX.COM >
> To: XXXX@XXXXX.COM
> Subject: How to Suppress SAS Log
> Date: Wed, 17 May 2006 07:18:37 -0700
>
> All,
>
> I have a long running SAS program that generates a lot of sas log
> information in a windows environment. I wanted to find out if there is
> a way to suppress the logging or if i could redirect the output the log
> to a dummy device.
>
> e.g. redirecting to a /den/null on unix platforms.
>
> Thanks for your help!
>
 
 
 

How to Suppress SAS Log

Post by joewhitehu » Fri, 19 May 2006 01:13:38

Toby,

But then the log would not be there should he actually want to view it
for some reason. I have some direct knowledge of the job in question,
and I would expect a tremendous amount of log output even with all
macro options turned off. As he understated, it really is a _LONG_
running job with a huge number of steps.

Joe
 
 
 

How to Suppress SAS Log

Post by jim2sta » Tue, 23 May 2006 19:11:29

Hi Sri,

PROC PRINTTO LOG='NUL'; RUN; * This should work in Windows (/ DOS);
(Try LOG='NUL' or 'NULL' or 'NULL:'. It seems to be a SAS incompatibility.)
or PROC PRINTTO LOG='/dev/null'; RUN; * This should work in Unix / Linux;

I don't know about other OS's.

Turn on again with: PROC PRINTTO LOG=LOG; RUN;

Remember, this is a PROC and should be placed _outside_ a DATA or other PROC
step.

Even better specify it as a commandline argument: -log 'NULL:' .
Under Unix/Linux it should read: '/dev/null' .

Regards - Jim.
 
 
 

How to Suppress SAS Log

Post by ghellrie » Tue, 23 May 2006 19:36:58

options nonotes;

does not supress the log, but makes it very short.