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
Are you sensitive to code walk-throughs peer review or QC review?
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
Have you ever used the SAS Debugger?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
Describe the function and untility of the most difficult SAS macro that you have written.
what do the sas log messages "numeric values have been converted to character" mean? : Sas programming
what is the basic structure sas administrator? : Sas-administrator
What are the difference between ceil and floor functions in sas?
Mention what is SAS data set?
explain what is data set in sas? : Sas-administrator
what are sas/access and sas/connect? : Sas programming
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake
what is slowly changing dimension? : Sas-di
what is intially documentation in sas?
Explain why double trailing @@ is used in input statement?