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 are the differences between proc means and proc summary?
How to include or exclude specific variables in a data set?
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
How do you use the do loop if you don’t know how many times you should execute the do loop?
How you can read the variables that you need?
Explain bmdp procedure?
how to debug and test the sas program? : Sas-administrator
Why double trailing @@ is used in input statement?
Tell me about % include and % eval? : sas-macro
what is the use of sas management console? : Sas-di
What is program data vector (pdv)?
Differentiate between sas functions and sas procedures.
What do you know about symput and symget?
how many types prompting framework can be broken down to? : Sas-bi
in the flow of data step processing, what is the first action in a typical data step? : Sas programming