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

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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.

View solution in original post

2 REPLIES 2
ballardw
Super User

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.

obj
Calcite | Level 5 obj
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 4845 views
  • 0 likes
  • 2 in conversation