Hi,
I cannot find a solution for the following problem, which I additionaly do not understand.
I have a large data step with several hash objects and iterators. Somehow at the start of a new observation the full content of all objects is printed to log (which slow down the computing time massively). The follwing WARNING is printed to the SAS log:
WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
However this only happens when the lookup object was succesful.
I tried to produce a smaller test macro, but failed to reproduce the warnings, it only happens when I ran with full glory (maybe some hash limits are reached?). I know its difficult to find out based on the information I provide, however I want to know when and why hash objects write contents to the log?
Here is a small example how I initialize has objects.
%macro checkerrs; data _null_; set dataset; if _n_ = 1 then do; declare hash lookupdata; lookupdata = _new_ hash(dataset:"check_rebal", ordered:"yes"); lookupdata.defineKey( "Date", "ID" ); lookupdata.defineData( "var1", "varN" ); lookupdata.defineDone(); format var1 best.; format varN best.; end; rc = lookupdata.find(); if rc=0 then put Date_ Date ID var1; run; %mend; %checkerrs;
I'm on version 9.4 TS Level 1M4.
many thanks in advance for any help.
The message
WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
is exactly that. You are doing something causing an error, which is the reason "Somehow at the start of a new observation the full content of all objects is printed to log". The most frequent cause is attempting do something with a value that is not valid. SAS provides a dump of the values so that you can determine which value(s) for which variables. By default SAS only displays 20 of the messages and then has the Warning which indicates that you likely have many more errors and your results are going to be invalid.
You should post a couple of the error messages.
Without seeing data I it is hard to provide more details though a common cause is mixind numeric and character such as attempting key on a numeric variable when the data in your set is character or vice versa.
The message
WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
is exactly that. You are doing something causing an error, which is the reason "Somehow at the start of a new observation the full content of all objects is printed to log". The most frequent cause is attempting do something with a value that is not valid. SAS provides a dump of the values so that you can determine which value(s) for which variables. By default SAS only displays 20 of the messages and then has the Warning which indicates that you likely have many more errors and your results are going to be invalid.
You should post a couple of the error messages.
Without seeing data I it is hard to provide more details though a common cause is mixind numeric and character such as attempting key on a numeric variable when the data in your set is character or vice versa.
Hi,
thanks a lot for your input. unfortunately there are no other warnings or error messages. However I managed to find the relevant part in the code by looking in detail into the dumps and in fact is was a numeric-character mixture that triggered the dumps.
many thanks.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.