Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How would you code a merge that will write the matches of
both to one data set, the non-matches from the left-most
data set to a second data set, and the non-matches of the
right-most data set to a third data set?

Answer Posted / sas job searcher

data x1y1
x1y0
x0y1;
/* x1y1, x1y0, x0y1 are output data set names */
merge left_most(in=x) right_most(in=y);
by id;
/* write all matches to x1y1: */
if x=1 and y=1 then output x1y1;
/* non-matches from the left-most data set: */
if x=1 and y=0 then output x1y0;
/* non-matches from the right-most data set: */
if x=0 and y=1 then output x0y1;
run;

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

for report generation which one you used proc report or data_null_?

7624


How is character variable converted into numeric variable and vice versa?

1106


which date functions advances a date time or date/time value by a given interval? : Sas programming

903


Mention the difference between ceil and floor functions in sas?

1101


what are the considerations when picking a SAS/STAT procedure?

3324


What areas of SAS are you most interested in?

1474


Define run-group processing?

980


why is a stop statement needed for the point=option on a set statement? : Sas programming

1038


what is sas database server? : Sas-di

1051


Which command is used to perform sorting in sas program?

987


What are the difference between ceil and floor functions in sas?

1275


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

992


Explain data_null_?

1003


Where do you use proc means over proc freq?

1053


Are you sensitive to code walk-throughs peer review or QC review?

3093