Date: Fri, 16 Feb 2007 15:32:04 -0800
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: Re: Fwd: supressing warning messages on SAS logs
Content-Type: text/plain; charset="UTF-8"
FWIW--you can throw a NOWARN on the end of your reset statement there to turn those warnings into notes.
Someone also posted the option:
dsoptions="note2err"
Which turns a lot of notes into either errors or warnings (I believe including the one about uninitialized variables, which I like quite a lot).
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Howard Schreier <hs AT dc-sug DOT org>
Sent: Friday, February 16, 2007 3:19 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Fwd: supressing warning messages on SAS logs
On Fri, 16 Feb 2007 16:46:21 -0500, Venky Chakravarthy <swovcc@HOTMAIL.COM>
wrote:
>Interestingly, the corresponding SQL NOEXEC issues only a NOTE and not
>a warning.
>
>19 proc sql noexec ;
>20 create table class as
>21 select *
>22 from sashelp.class ;
>NOTE: Statement not executed due to NOEXEC option.
Good point.
My impression is that there are no criteria or guidelines in place to bring about consistency in message levels (ERROR vs. WARNING vs. NOTE vs. nothing).
Consider
4 proc sql;
5 reset inobs=2;
6 select name from sashelp.class;
WARNING: Only 2 records were read from SASHELP.CLASS due to INOBS= option.
7 reset inobs=max;
8 options obs=2;
9 select name from sashelp.class;
10 options obs=max;
11 quit;
Use the PROC SQL option to subset and you get a WARNING. Use the equivalent system option to do the exact same thing and there is not even a NOTE.
>
>Venky Chakravarthy
>
>On Fri, 16 Feb 2007 08:30:39 -0500, Nat Wooding
><Nathaniel.Wooding@DOM.COM>
>wrote:
>
>>While I can readily understand the concerns expressed by several folk
>>about the hazards of surpressing notes and warnings in the log, not
>>all of these are caused by bad code. Consider the following log:
>>
>>
>>
>>415 Data a;
>>416 x=1;
>>
>>NOTE: The data set WORK.A has 1 observations and 1 variables.
>>NOTE: DATA statement used (Total process time):
>> real time 0.00 seconds
>> cpu time 0.00 seconds
>>
>>
>>417 proc print;
>>418 run cancel;
>>
>>WARNING: The procedure was not executed at the user's request
>>
>>
>>Obviously, this is valid SAS code and I have to wonder why a warning
>>is issued instead of a note or even a simple log statement saying that
>>the step was not run. Some warnings should be taken to heart but this
>>is certainly not one of them.
>>
>>
>>
>>
>>Nat Wooding
>>Environmental Specialist III
>>Dominion, Environmental Biology
>>4111 Castlewood Rd
>>Richmond, VA 23234
>>Phone:804-271-5313, Fax: 804-271-2977
>>
>>
>>
>> David L Cassell
>> <davidlcassell@MS
>> N.COM> To
>> Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
>> Discussion" cc
>> <SAS-L@LISTSERV.U
>> GA.EDU> Subject
>> Re: Fwd: supressing warning
>> messages on SAS logs
>> 02/16/2007 01:13
>> AM
>>
>>
>> Please respond to
>> David L Cassell
>> <davidlcassell@MS
>> N.COM>
>>
>>
>>
>>
>>
>>
>>meenit@AOL.COM wrote:
>>>
>>>Could someone pretty please send me a sample code that will suppress
>>>appearance of warning messages on the SAS log?
>>>
>>
>>As others have pointed out, this is A Bad Thing. Don't do this.
>>
>>I go the other direction: I have some NOTEs that I treat as red flags
>>too.
>>
>>But the question seems to be:
>>What are you doing that is yielding these warnings, and what do they
>>say and why can't you correct the code instead?
>>
>>HTH,
>>David
>>--
>>David L. Cassell
>>mathematical statistician
>>Design Pathways
>>3115 NW Norwood Pl.
>>Corvallis OR 97330
>>
>>_________________________________________________________________
>>Don’t miss your chance to WIN 10 hours of private jet travel from
>>Microsoft® Office Live
>>http://clk.atdmt.com/MRT/go/mcrssaub0540002499mrt/direct/01/
>>
>>
>>-----------------------------------------
>>CONFIDENTIALITY NOTICE: This electronic message contains information
>>which may be legally confidential and/or privileged and does not in
>>any case represent a firm ENERGY COMMODITY bid or offer relating
>>thereto which binds the sender without an additional express written
>>confirmation to that effect. The information is intended solely for
>>the individual or entity named above and access by anyone else is
>>unauthorized. If you are not the intended recipient, any disclosure,
>>copying, distribution, or use of the contents of this information is
>>prohibited and may be unlawful. If you have received this electronic
>>transmission in error, please reply immediately to the sender that you
>>have received the message in error, and delete it. Thank you.
|