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 the purpose of _character_ and _numeric_?
Explain data_null_?
for whom is sas data integration studio designed? : Sas-di
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
What are the data types does SAS contain?
What is run-group processing?
List down the reasons for choosing sas over other data analytics tools.
Enlist the syntax rules followed in sas statements.
how many types of prompts are there? : Sas-bi
what are sas bi dashboard components? : Sas-bi
what versions of sas have you used (on which platforms)? : Sas programming
explain what is factor analysis? : Sas-administrator
what is the use of proc contents and proc print in sas? : Sas-administrator
What is the use of PROC gplot?
How will you generate test data with no input data?