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 / arun & g.n.rao

data one;
input ID$ NAME$;
datalines;
A01 SUE
A02 TOM
A05 KAY
A10 JIM
;
RUN;
DATA TWO;
INPUT ID$ AGE SEX$;
DATALINES;
A01 58 F
A02 20 M
A04 47 F
A10 11 M
;
RUN;

DATA N1 N2 N3;
MERGE ONE (IN=X) TWO (IN=Y);
BY ID;
IF X=1 AND Y=1 THEN OUTPUT N1;
IF X=1 AND Y=0 THEN OUTPUT N2;
IF X=0 AND Y=1 THEN OUTPUT N3;
RUN;

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What makes sas stand out to be the best over other data analytics tools?

1054


Explain proc univariate?

1026


how do you want missing values handled? : Sas programming

951


What will calendar procedure do?

1068


What is the basic structure of the SAS base program?

1315


What is the difference between SAS functions and procedures?

1144


Enlist the syntax rules followed in sas statements.

1079


How does the internal authentication work in sas? : sas-grid-administration

1114


What is maximum storage capability of SAS?

1423


How do you debug and test your SAS programs?

1554


What is the difference between proportion and average?

3329


what are _numeric_ and _character_ and what do they do? : Sas programming

1147


Do you need to rearrange the order of the data for the report?

2303


What are all the problems you faced while validating tables and reports?

3462


how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

1332