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

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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