Date: Mon, 25 Oct 2004 00:39:59 -0400
Reply-To: sashole@bellsouth.net
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Paul M. Dorfman" <sashole@BELLSOUTH.NET>
Organization: Sashole of Florida
Subject: Re: clear log
In-Reply-To: <3fe850bd04102420007aa9c1db@mail.gmail.com>
Content-Type: text/plain; charset="US-ASCII"
It is nearly impossible to say without knowing what SAS code your macro
assembles. You can prevent the macro processor itself from writing certain
information to the SAS log by setting the SAS system options to NOMPRINT,
NOMLOGIC, NOSGEN and such, but if the macro concocts SAS code writing its
won stuff to the SAS log, you have to delve into the details of the macro.
For example, the macro can produce SAS code executing %INCLUDE directives,
which dump the entire content of the %INCLUDEd file to the log unless the
system option NOSOURCE2 is in effect. Or it can produce SAS code assembling
Data steps using CALL EXECUTE, which in turn will write to the log whatever
it shrugs from its stack. Of course, you can completely "ground" the log
file by directing it to a null file; how this is done depends on the
operating system. In the case of the real computer, one would code the JCL
line
//SASLOG DD DUMMY
and that would be the end of it. Under Windows, I believe you can route the
log output to a NULL file (i.e. nothing) via the PROC PRINTO as
* kill all log output ;
proc printto log = null ;
run ;
..... Some SAS code, including macro execution, etc. ...
* restore writing to log ;
proc printto ;
run ;
Unsure UNIX, but highly suspect a similar trick should work just as well.
Generally speaking, killing the whole log output is not a good idea; you
might miss many interesting things telling you soemthing really useful why,
where, and when things go wrong (as they unavoidably will). So you may want
to heed the advice of telling the macro processor and/or %include directives
to hush via the options mentioned above rather than eliminating the log
output for good.
Kind regards,
----------------
Paul M. Dorfman
Jacksonville, FL
----------------
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> Behalf Of Lixiong Gu
> Sent: Sunday, October 24, 2004 11:01 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: clear log
>
> I have a macro that simulates 3600 dataset and outputs each
> to an external file. However, the macro would write values of
> the dataset into the LOG window and I have to clean the LOG
> every 10 seconds.
> Could anyone please tell me if there is a way to
> automatically clean the logs or to prevent writing data on
> the LOG window? I'd appreciate if you could tell me what
> caused the macro to write values of the dataset to the LOG
> window, output, put, or file statement? Thank you so much.
>
> Lixiong
>
|