LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 Feb 2011 13:33:09 -0600
Reply-To:     matt.pettis@THOMSONREUTERS.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Matthew Pettis <matt.pettis@THOMSONREUTERS.COM>
Subject:      Re: Turn off warning messages in SAS log
Comments: To:
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

Hi Joe,

Thanks for the help. I just tried it, and no luck - still get warnings.



From: Joe Matise [] Sent: Thursday, February 10, 2011 1:25 PM To: Pettis, Matthew (Legal) Cc: Subject: Re: Turn off warning messages in SAS log

Not sure if this is helpful, but you might look at the DKRICOND/DKROCOND options in Options->System->Files->SAS Files. Try setting one or the other (likely O) to 'NOWARN' and see if it stops those errors.


On Thu, Feb 10, 2011 at 1:19 PM, Matthew Pettis <> wrote:

Hi Suzanne,

Thanks for the reply. I tried it, and still got warnings. I looked up the documentation for the option, and it makes sense that it doesn't work (see below). It only works with the listed actions below, which does not include the action I care about --MODIFY.

Thanks, Matt

NOWARN suppresses the error processing that occurs when a SAS file that is specified in a SAVE, CHANGE, EXCHANGE, REPAIR, DELETE, or COPY statement or listed as the first SAS file in an AGE statement, is not in the procedure input library. When an error occurs and the NOWARN option is in effect, PROC DATASETS continues processing that RUN group. If NOWARN is not in effect, PROC DATASETS stops processing that RUN group and issues a warning for all operations except DELETE, for which it does not stop processing.

-----Original Message----- From: Suzanne McCoy [] Sent: Thursday, February 10, 2011 11:40 AM To: Pettis, Matthew (Legal); SAS-L@LISTSERV.UGA.EDU Subject: RE: Turn off warning messages in SAS log

proc datasets has a nowarn option

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Matthew Pettis Sent: Thursday, February 10, 2011 12:10 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Turn off warning messages in SAS log


I was wondering if there was a way to turn off warning messages to the SAS log. In particular, I want to turn them off when I use a PROC DATASETS with MODIFY to format and label some variables. The reason I want to do this is that I create a bunch of datasets that all have 90% of their columns in common, and I want to efficiently label and format the columns. My solution to this is to make one PROC DATASETS statement that has the information to do this for the union of all of the column names from all possible datasets, wrap that PROC in a macro parameterized by the dataset name, and then just feed each dataset to the macro after it is created. This method works fine for me and makes it easy to maintain a single point of labeling and formatting. The only drawback is that each dataset that I run through the macro generates warnings for the columns it tries to label and format but are missing from the dataset.

Below is the output of a quick sample of what I mean -- What I want to do is turn off warning messages just for the duration of the PROC DATASETS operation. I've tried using options 'nonotes' and 'nosource', but that doesn't suppress the warning. I could turn off the whole log for the duration of the PROC DATASETS, but that seems extreme and I'd like to still know if I get errors in the statement.

Does someone know how I can turn off warnings to format and label statements just for a section of code?

Thanks, Matt

===== SAS Log =====

253 data have; 254 x = 1; 255 run;

NOTE: Compression was disabled for data set WORK.HAVE because compression overhead would increase the size of the data set. NOTE: The data set WORK.HAVE has 1 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds

256 257 proc datasets nolist nodetails; 258 modify have; WARNING: Variable Y not found in data set WORK.HAVE. 259 format 260 x best32. 261 y best32. 262 ; 263 label WARNING: Variable Y not found in data set WORK.HAVE. 264 x = 'X var' 265 y = 'Y var' 266 ; 267 run;

NOTE: MODIFY was successful for WORK.HAVE.DATA. 268 quit;

NOTE: PROCEDURE DATASETS used (Total process time): real time 0.01 seconds cpu time 0.01 seconds

Back to: Top of message | Previous page | Main SAS-L page