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 is the use of proc sql? : Sas programming
Briefly explain input and put function?
Which date function advances a date, time or datetime value by a given interval?
Where do you use proc means over proc freq?
What is PROC in SAS?
Explain translate function?
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
What function CATX syntax does?
Tell e how how dealt with..
For what purpose would you use the RETAIN statement?
how will you location sas platform applications available from web browser? : Sas-bi
name some data transformation used in sas di? : Sas-di
what is sas metadata server? : Sas-di
How would you define the end of a macro? : sas-macro
Explain what is data step?