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

if i having variables named a b c d e f ,how to find total of
each variable ????give syntax...??

Answer Posted / anik chatterjee

The last answer is right but if all the values are missing
then sum function will give a note in log. Best way to add
0 with all value. Hence if all value is missing then total
would be 0 and no note will be there.

proc sql;
create table SUM as
select sum(a) as sum_a,
sum(b,0) as sum_b,
sum(c,0) as sum_c,
sum(d,0) as sum_d,
sum(e,0) as sum_e,
sum(f,0) as sum_f
from input_dataset_name;
quit;

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you know about sas and what we do? : sas-grid-administration

1148


where to use sas business intelligence? : Sas-bi

1091


which features do you use to check the data validations and errors? : Sas-administrator

1057


What is the difference between %local and %global? : sas-macro

1189


What are the statements that are executed only?

1150


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

3472


How can sas program be validated?

1037


how do you want missing values handled? : Sas programming

959


What are the five ways to do a table lookup in sas? : sas-grid-administration

1064


How are numeric and character missing values represented internally?

1659


Give some examples where proc report’s defaults are different than proc print’s defaults?

1075


Give e an example of..

2101


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2759


What are the difference between the sas data step and sas procs?

1187


What are the data types that sas contain?

1186