Discussion:
How to Suppress SAS Log
(too old to reply)
Sri
2006-05-17 14:18:37 UTC
Permalink
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!
toby dunn
2006-05-17 14:40:23 UTC
Permalink
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 <***@GMAIL.COM>
Reply-To: Sri <***@GMAIL.COM>
To: SAS-***@LISTSERV.UGA.EDU
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!
toby dunn
2006-05-17 15:47:48 UTC
Permalink
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 <***@BELLSOUTH.NET>
Reply-To: ***@BELLSOUTH.NET
To: SAS-***@LISTSERV.UGA.EDU
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
Date: 2006/05/17 Wed AM 10:40:23 EDT
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
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!
Joe Whitehurst
2006-05-17 15:34:49 UTC
Permalink
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
Date: 2006/05/17 Wed AM 10:40:23 EDT
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
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!
Joe Whitehurst
2006-05-17 16:13:38 UTC
Permalink
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
Post by toby dunn
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
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
Date: 2006/05/17 Wed AM 10:40:23 EDT
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
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!
Gerhard Hellriegel
2006-05-22 10:36:58 UTC
Permalink
options nonotes;

does not supress the log, but makes it very short.
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.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
Post by Sri
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!
Jim Groeneveld
2006-05-22 10:11:29 UTC
Permalink
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.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
Post by Sri
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!
Continue reading on narkive:
Loading...