Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / vishal

Calculate age in dataset B by using the following code:
data ages;
set b;
retain current;
if _n_=1 then current=today();
format bday current worddate20.;
age=int(intck('month',bday,current)/12);
if month(bday)=month(current) then
age=age-(day(bday)>day(current));
run;

Source: http://support.sas.com/kb/24/567.html

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is factor analysis?

1199


what is snowflake schema? : Sas-di

1263


Explain what Proc glm does?

1299


explain the function of substr in sas? : Sas-administrator

1069


What is the SAS data set?

1178


What are the automatic variables for macro? : sas-macro

1331


how does sas handle missing values in functions? : Sas programming

1286


explain the use of % includes a statement in sas? : Sas-administrator

1046


what is the difference between infile and input? : Sas-administrator

1204


What is the purpose of _character_ and _numeric_?

1109


How to specify variables to be processed by the freq procedure?

1119


Explain the main difference between the sas procedures and functions? : Sas-administrator

1117


What is Linear Regression?

1225


What is interleaving in SAS?

1178


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

1203