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...

calculate the sum of value using only DATA STEP.
data count_;
input year name $ value;
cards;
2006 xxx 10
2007 yyy 12
2006 xxx 20
2008 yyy 15
2007 xxx 15
;

out put should be like this
year name T_value
-----------------------
2006 xxx 30
2007 xxx 15
2007 yyy 12
2008 xxx 15

Answer Posted / ashish

data new;

set tech ;
by year name;
if first.year or first.name then do;
sum=0;
end;
sum+value;
if last.year or last.name ;

run;

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 the difference between SAS functions and procedures?

1161


What do you know about sas data set?

1127


What are the applications primarily used by business analyst? : Sas-bi

1005


how can you put a "trace" in your program? : Sas programming

1072


how can you import .csv file in to sas? : Sas programming

1111


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

1076


what do the pad and dim functions do? : Sas programming

1038


What is a macro routine?

2734


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

1143


What are the features of SAS?

1046


Describe the ways in which you can create macro variables?

1206


How to sort in descending order?

1268


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

1283


What are the different versions of sas that you have used until now? : sas-grid-administration

1348


how does sas handle missing values in a merge? : Sas programming

1060