BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kastchei
Pyrite | Level 9

Hello!

 

I have a SAS dataset with a composite index.  I'm running a SAS procedure (StdRate) over it many times, and I'm looking to suppress information being written to the log so that it doesn't fill it up and pause.  I have noNotes, noSource, and msgLevel = i, and that gets rid of everything except the list of variables that make up the index being used.

 

Here is the log for one call without anything suppressed:

38     proc stdRate    data = analysis.nSummarizeT (where = (<snipped>)
39                  refData = analysis.qUSCensusFormatted (where = (<snipped>)
40                  method  = direct stat = rate(mult = 100000) effect = ratio
41                  alpha   = 0.05 CL = gamma(type = average)
42                  plots   = all;
INFO: Index unique1 selected for WHERE clause optimization.
43         by levelN level groupN group exposureTypeN exposureType _type_ consentFirst remove;
44
45         population group = exposureHigh event = events total = personYears;
46         reference                                      total = population;
47         strata gender ageGroup / effect stats(cl = poisson) order = data;
INFO: Use of index unique1 for WHERE clause optimization canceled.
INFO: Index index selected for WHERE clause optimization.
INFO: Index index selected for BY clause processing.
NOTE: An index was selected to execute the BY statement.
      The observations will be returned in index order rather than in physical order.  The selected index is for the variable(s):
 levelN
 level
 groupN
 group
 exposureTypeN
 exposureType
 _type_
 consentFirst
 remove
48         ods output StdRate = ___StdRate (compress = no) Effect = ___Effect (compress = no);
49     run;
NOTE: The data set WORK.___EFFECT has 1 observations and 19 variables.
NOTE: The data set WORK.___STDRATE has 2 observations and 21 variables.
NOTE: PROCEDURE STDRATE used (Total process time):
      real time           0.63 seconds
      user cpu time       0.14 seconds
      system cpu time     0.17 seconds
      memory              11344.90k
      OS Memory           86928.00k
      Timestamp           02/09/2021 09:40:35 PM
      Step Count                        9281  Switch Count  0

Here is the log for several calls with noNotes, noSource, and msgLevel = i:

levelN
 level
 groupN
 group
 exposureTypeN
 exposureType
 _type_
 consentFirst
 remove
 levelN
 level
 groupN
 group
 exposureTypeN
 exposureType
 _type_
 consentFirst
 remove
 levelN
 level
 groupN
 group
 exposureTypeN
 exposureType
 _type_
<etc.>

Is there any way to prevent SAS from printing these index variables?

 

Warm regards, 🙂

Michael

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

> Is there any way to prevent SAS from printing these index variables?

This does it:

filename LOGFILE temp;
proc printto log=LOGFILE; run;
proc print; by I; run;
proc printto log=log; run;

 

 

View solution in original post

4 REPLIES 4
qoit
Pyrite | Level 9

options msglevel=N should suppress printing detailed index related information, note that 'N' value of this options is default.

Kastchei
Pyrite | Level 9

It suppresses notes that begin with INFO:, but it does not, sadly, suppress the index variables being listed out.  I edited my post to include that.

ChrisNZ
Tourmaline | Level 20

To replicate:

data t(index=(I)); I=1; run;
options nonotes ; 
proc print; by I; run;

This looks like an "omission" (aka a defect), and there is no reason this message should appear in the log imho, even if it's not a NOTE per se.

I'd report it to SAS Tech support.

 

ChrisNZ
Tourmaline | Level 20

> Is there any way to prevent SAS from printing these index variables?

This does it:

filename LOGFILE temp;
proc printto log=LOGFILE; run;
proc print; by I; run;
proc printto log=log; run;

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 983 views
  • 1 like
  • 3 in conversation