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
Are you involved in writing the inferential analysis plan? Tables specfications?
What is the use of divide function?
i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm
I need level 2 to 5 sas using companies in india
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
What does the trace option do?
Why double trailing @@ is used in input statement?
explain the main difference between the nodup and nodupkey options? : Sas-administrator
how to debug and test the sas program? : Sas-administrator
What is by-group processing?
How necessary is it to be creative in your work?
What are the difference between the sas data step and sas procs?
Give an example where SAS fails to convert character value to numeric value automatically?
what is sas metadata server? : Sas-di
How do you define proc in sas? : sas-grid-administration