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

Explain translate function?

1213


What function CATX syntax does?

1225


what are input dataset and output dataset options? : Sas programming

1106


what are all the reports you generated in your recent project?

2199


How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

2934


what other sas products have you used and consider yourself proficient in using? : Sas programming

1115


How would you define the end of a macro?

1097


Differentiate between proc means and proc summary.

1064


What does PROC print, and PROC contents do?

1238


What are types of transport files?

8008


What is the maximum and minimum length of macro variable

1257


What does proc print, and proc contents are used for?

1136


Name validation tools used in SAS

1184


Describe the function and untility of the most difficult SAS macro that you have written.

2109


how do you pull data from equifax?tell me the process?

1801