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

And a note:  There's something to keep in mind if you are playing with very very very large dataset and composite keys as hash keys that would not fit in memory and may have to be treated with MD5 or SHA256 hash algorithms to make it compatible. However, in my 5+ years of SAS experience, I haven't encountered the need to be concerned about that yet. But always good to be aware though.

 

 

 

 

singhsahab
Lapis Lazuli | Level 10

@novinosrin  .. Thank you so much . I'll keep it in mind. Just have one more query .

 

if i declared has object as below. Does it's feasible in comparison open declaration of hash object .

 

if _n_=1 then do;
declare hash h(dataset:'test1');
h.definekey('id','site');
h.definedata('name');
h.definedone();
end;

 

 

novinosrin
Tourmaline | Level 20

I don't comprehend what you mean by " open declaration"

 

Are you trying to mean:

 open declaration is

if _n_=1 then do;

dcl hash statements......

end;

vs

 

just 

dcl hash....

....

?

 

If that above is what your question is, I'd suggest the not so regular hash users to use the one you suggested as opposed to the style i showed that loops through the set until the confidence and expertise gets to a certain level. 

There will be a time, as the requirement narrates to the mind, the code  is in the fingers. This is when we feel we are in SAS world 🙂

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 17 replies
  • 1909 views
  • 4 likes
  • 4 in conversation