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

Suppose there is a SAS dataset with following values -
Parent Child
A B
B C
D E
F G
G H
H I
and so on…..
This goes onto 1000s of observations/rows.
Now how do we identify from this dataset Grandparents and
Grandchildrens ?

Answer Posted / jayant

data tet;
input par $ child $;
datalines;
A B
B C
C D
E F
;
run;




data tet1;
set tet;
grand=lag(par);
drop par;
run;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is connection profile? : sas-grid-administration

1177


What are the special input delimiters used in SAS?

1185


Give e an example of..

2105


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?

1102


How to limit decimal places for the variable using proc means?

1076


how sas deals with business intelligence? : Sas-bi

1056


how does sas handle missing values in procs? : Sas programming

1260


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

2104


What are the scrubbing procedures in sas?

1011


what is treatment emergent events and treatment emregent adverse event

2407


what is hash files in sas and why we are using this one in sas?

2217


how does sas handle missing values in assignment statements? : Sas programming

1027


how does sas handle missing values in functions? : Sas programming

1219


Compare sas with other data analytics tools.

1035


How substr function works in sas?

1226