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

Mention what is PROC in SAS?

603


what is the function of catx syntax? : Sas-administrator

654


Differentiate between proc means and proc summary.

604


how do you debug and test your sas programs? : Sas programming

561


what are the considerations when picking a SAS/STAT procedure?

2899






What are the table names in oracle database...?

2250


how sas deals with business intelligence? : Sas-bi

586


What are all the problems you faced while validating tables and reports?

3014


What can be the size of largest dataset in SAS?

717


What does the trace option do?

666


Are you sensitive to code walk-throughs peer review or QC review?

2610


Explain append procedure?

636


how to remove duplicates using proc sql?

630


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

4203


What is PDV?

725