We want to merge file A and B. File A has variable age,
file B provide birthdate. How to merge the data according
to age in file B
Answer Posted / alok karan
First calculate age in BB dataset:
data bbb;
set bb;
age=round(yrdif(birthdate,today(),'Actual'),1);
run;
proc sort data=bbb;
by age;
drop birthdate;
run;
Now merge both dataset by age variable:
data abc;
merge aa bbb;
by age;
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what are sas bi dashboard components? : Sas-bi
Can you explain the process of calendar?
What is data _null_?
What are the different operating system platforms in which we can use sas? : sas-grid-administration
What is the difference between nodupkey and nodup options?
What is the use of divide function?
explain the concepts and capabilities of business object? : Sas-bi
What do the mod and int function do? : Sas programming
how would you create multiple observations from a single observation? : Sas programming
What is substr function?
How you can read the variables that you need?
How long can a macro variable be? A token? : sas-macro
what is transformation in sas data integration? : Sas-di
How do you specify the number of iterations and specific condition within a single do loop?
What are common programming errors committed in sas