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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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