BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
I have big datasets to merge , so thought of using hash object for this .Can anyone tell me, how to include the conditional statements in this? My code using merge looks as below

data merged;
merge p(in=a) q(in=b) r(in=c) r(in=d);
by var1;
if a and b then flag_p=1;else flag_p=0;
if a and c then flag_p=1;else flag_q=0;
if a and d then flag_p=1;else flag_r=0;
run;

Your help w'd be highly appreciated.

Thanks,
SL
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
What aspect of the hash object feature do you feel would be better than a DATA step MERGE process, as shown below?

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Scott,

I am working with the datasets of 12,19 and 33 GB sized files which are to be sorted before merging and that results in lot of time consumption, which w'd be greatly reduced using hash objects.However I figured out to do what I wanted. I you want to know more about hash objects features, then google it ,its really efficient while dealing with big datasets.

Thanks for showing interest,
SL

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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