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
What do you know about sas and what we do? : sas-grid-administration
where to use sas business intelligence? : Sas-bi
which features do you use to check the data validations and errors? : Sas-administrator
What is the difference between %local and %global? : sas-macro
What are the statements that are executed only?
What are all the problems you faced while validating tables and reports?
How can sas program be validated?
how do you want missing values handled? : Sas programming
What are the five ways to do a table lookup in sas? : sas-grid-administration
How are numeric and character missing values represented internally?
Give some examples where proc report’s defaults are different than proc print’s defaults?
Give e an example of..
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
What are the difference between the sas data step and sas procs?
What are the data types that sas contain?