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
What is connection profile? : sas-grid-administration
What are the special input delimiters used in SAS?
Give e an example of..
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?
How to limit decimal places for the variable using proc means?
how sas deals with business intelligence? : Sas-bi
how does sas handle missing values in procs? : Sas programming
please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??
What are the scrubbing procedures in sas?
what is treatment emergent events and treatment emregent adverse event
what is hash files in sas and why we are using this one in sas?
how does sas handle missing values in assignment statements? : Sas programming
how does sas handle missing values in functions? : Sas programming
Compare sas with other data analytics tools.
How substr function works in sas?