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 operational data and operational system? : Sas-di

1104


What are the special input delimiters used in SAS?

1176


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

1000


what is study design in while working with SAS? what are screening variables in SAS?

2239


Which command is used to perform sorting in sas program?

1043


How do you specify the number of iterations and specific condition within a single do loop?

1099


how are numeric and character missing values represented internally? : Sas programming

1142


What is the order of application for output data set options, input data set options and SAS statements?

1551


What is run-group processing?

1153


do you prefer proc report or proc tabulate? Why? : Sas programming

979


What is the use of divide function?

1060


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

1008


explain the concepts and capabilities of business object? : Sas-bi

958


Of all your work, where have you been the most successful?

4664


describe how to adjust the performance of data integrator? : Sas-di

1005