From: jaheuk on
dear all,
finally we are migrating to V9 so we can use the new hash tables.
I have seen some nice examples to do a LOOKUP... so far so good...

but has someone an example with the find() method that when a lookup
was not succesfull (based on a date) the value of the record closest
to the lookup value is taken??

Regards,
Herman
From: Patrick on
Hi Herman

Using the find() method the key must be an exact match.
Something like a "closest()" method does not exist.

You could of course always use a do until loop where you increase (or
decreas) the the date value in the key until the find() method returns
0.
Just make sure that the dates don't contain fractions for the keys or
you risk to program a never ending loop.

Do you already know the Hash Object Tip Sheet:
http://support.sas.com/rnd/base/datastep/dot/hash-tip-sheet.pdf

HTH
Patrick