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
how would you determine the number of missing or nonmissing values in computations? : Sas programming
What is by-group processing?
which features do you use to check the data validations and errors? : Sas-administrator
What is the maximum and minimum length of macro variable
What is PROC in SAS?
AE datasets names? how many types?
How can sas program be validated?
What are the ways in which macro variables can be created in sas programming?
What are the difference between the sas data step and sas procs?
what are 5 ways to perform a table lookup in sas? : Sas-administrator
it will become easy if uuu provide website linkssss and list of consultanciessssss
: and & modifiers.
Tell me about % include and % eval? : sas-macro
how to read the variables in sas? : Sas-administrator
describe the interaction table in sas di? : Sas-di