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 data _null_?
what are validation tools that are used in sas? : Sas-administrator
How would you identify a macro variable? : sas-macro
What are the implications?
how to generate the test data in sas without input data? : Sas-administrator
What is the maximum length of the macro variable?
Give some examples where proc report’s defaults are same as proc print’s defaults?
What are the different servers in sas? : sas-grid-administration
explain what is data set in sas? : Sas-administrator
How would you identify a macro variable?
do you need to know if there are any missing values? : Sas programming
what are input dataset and output dataset options? : Sas programming
how does sas handle missing values in procs? : Sas programming
How is character variable converted into numeric variable and vice versa?
What do you know about sas and what we do? : sas-grid-administration