f



Warning message

Hiya

I have a macro whereby I am using proc report to print different information
from the same dataset.

There is no problem with producing the reports, however, as I using not
necessarily selecting the same columns for each report I DEFINE all columns
and specify what columns I require, via the COLUMN statement.

I am producing a number of different reports from the same dataset.
There are similarities within each report. It is just that some of the
columns vary from report to report, and I don't want to produce a separate
dataset (and report) for each criteria.

I realise that one should not suppress warning messages, but, without making
the macro horribly complex and only defining the columns I require for each
report (which is probably the best way), how can I suppress the warning
messages for the DEFINE variables not specified in the COLUMN statement?

Needless to say, I usually dislike warning messages and normally attempt to
prevent them by good coding.

I am not really concerned with how to prevent the warning messages. It's
just that I don't want to see them.
0
tom.hide1 (89)
7/8/2005 2:03:41 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

3 Replies
881 Views

Similar Articles

[PageSpeed] 42

Tom,

Could you give us some code and the warning?



Toby Dunn




From: Tom Hide <tom.hide@DEHIWORLD.COM>
Reply-To: Tom Hide <tom.hide@DEHIWORLD.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Warning message
Date: Fri, 8 Jul 2005 10:03:41 -0400

Hiya

I have a macro whereby I am using proc report to print different information
from the same dataset.

There is no problem with producing the reports, however, as I using not
necessarily selecting the same columns for each report I DEFINE all columns
and specify what columns I require, via the COLUMN statement.

I am producing a number of different reports from the same dataset.
There are similarities within each report. It is just that some of the
columns vary from report to report, and I don't want to produce a separate
dataset (and report) for each criteria.

I realise that one should not suppress warning messages, but, without making
the macro horribly complex and only defining the columns I require for each
report (which is probably the best way), how can I suppress the warning
messages for the DEFINE variables not specified in the COLUMN statement?

Needless to say, I usually dislike warning messages and normally attempt to
prevent them by good coding.

I am not really concerned with how to prevent the warning messages. It's
just that I don't want to see them.
0
tobydunn (6020)
7/8/2005 2:24:17 PM
Hi Tom,

Would OPTIONS NOWARN do for you? It suppresses all warnings AND ERRORS!
until an OPTIONS WARN ERROR, not just those of DEFINE statements.

An alternative it to run PROC PRINTTO just before and after the PROC
REPORT. In there you should specify LOG='NUL' with Windows or
LOG='/dev/null/' with Unix/Linux. With second one you should not specify
any LOG (see your docs). This suppresses all log output of the REPORT
procedure.

Regards - Jim.
--
Y. (Jim) Groeneveld, MSc., Biostatistician, Vitatron b.v., NL
Jim.Groeneveld_AT_Vitatron.com (replace _AT_ by AT sign)
http://www.vitatron.com, http://home.hccnet.nl/jim.groeneveld

My computer always teaches me something new I thought I knew already.

[common disclaimer]

On Fri, 8 Jul 2005 10:03:41 -0400, Tom Hide <tom.hide@DEHIWORLD.COM> wrote:

>Hiya
>
>I have a macro whereby I am using proc report to print different
information
>from the same dataset.
>
>There is no problem with producing the reports, however, as I using not
>necessarily selecting the same columns for each report I DEFINE all columns
>and specify what columns I require, via the COLUMN statement.
>
>I am producing a number of different reports from the same dataset.
>There are similarities within each report. It is just that some of the
>columns vary from report to report, and I don't want to produce a separate
>dataset (and report) for each criteria.
>
>I realise that one should not suppress warning messages, but, without
making
>the macro horribly complex and only defining the columns I require for each
>report (which is probably the best way), how can I suppress the warning
>messages for the DEFINE variables not specified in the COLUMN statement?
>
>Needless to say, I usually dislike warning messages and normally attempt to
>prevent them by good coding.
>
>I am not really concerned with how to prevent the warning messages. It's
>just that I don't want to see them.
0
jim1stat (510)
7/8/2005 2:33:26 PM
Hiya Jim

I had tried the Options nowarn, but SAS did not like that.

What I decided to do was write the log to a file, then print the log,
supressing all warning messages.

It's not a neat way of doing it, but it works. It is certainly something
that I would not normally recommend.

Thanks

Tom

"Rules are for the obedience of fools and the guidance of the wise."
0
tom.hide1 (89)
7/11/2005 6:34:42 AM
Reply: