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 are the differences between proc means and proc summary?

1082


How to include or exclude specific variables in a data set?

1077


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

1149


How do you use the do loop if you don’t know how many times you should execute the do loop?

1226


How you can read the variables that you need?

1081


Explain bmdp procedure?

993


how to debug and test the sas program? : Sas-administrator

989


Why double trailing @@ is used in input statement?

1163


Tell me about % include and % eval? : sas-macro

1101


what is the use of sas management console? : Sas-di

1045


What is program data vector (pdv)?

1204


Differentiate between sas functions and sas procedures.

1161


What do you know about symput and symget?

1172


how many types prompting framework can be broken down to? : Sas-bi

1040


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

1026