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 🙂

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 2381 views
  • 4 likes
  • 4 in conversation