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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 729 views
  • 0 likes
  • 2 in conversation