BookmarkSubscribeRSS Feed

At the moment when a hash key isn't found in a data step using hash.find(), SAS returns a generic 'ERROR: Key not found.'

Would aid debugging if a line:column number was returned, and what key caused the failure.

Super User
Super User

Please explain more what situation you are talking about.  It is not reasonable for the FIND() method to throw an error just because the key value is not found in the hash object. That is not a programming error, but an expected possible result for searching a hash object.  You wouldn't want SAS to throw an error if you used the INDEX() function to search for a substring and it was not found.

Fluorite | Level 6

SAS does return an error message.  I'm asking that it be more informative.


This is using the form: