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

here i can write the code using PROC SQL;
plz ans in DATA STEP;

proc sql;
select year,name, sum(value)as T_value from count_ group by
year, name having sum(value) order by name;
quit;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming

1072


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

2451


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

2138


What is the maximum length of the macro variable? : sas-macro

1152


Can you execute macro within another macro? : sas-macro

1048


what is the purpose of _error_? : Sas programming

1188


explain about data integrator metadata reports? : Sas-di

1165


what is data integration? : Sas-di

1164


What is the difference between class statement and by statement in proc means?

1391


What do the SAS log messages "numeric values have been converted to character" mean?

1428


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

1139


What would be the value of month at the end of data step execution and how many observations would be there?

1232


I have a dataset concat having a variable a b & c. How to rename a b to e & f?

1331


why is sas considered self-documenting? : Sas programming

1186


What does the RUN statement do?

1349