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

describe how to adjust the performance of data integrator? : Sas-di

561


Do you need to rearrange the order of the data for the report?

1830


What is the difference between proportion and average?

2753


what is the effect of the options statement errors=1? : Sas programming

588


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

648






what are _numeric_ and _character_ and what do they do? : Sas programming

672


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

1660


What are the scrubbing procedures in sas?

569


Describe a time when you were really stuck on a problem and how you solved it?

2082


what is data governance? : Sas-di

621


Describe the ways in which you can create macro variables? : sas-macro

574


What does proc print, and proc contents are used for?

609


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?

634


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

3004


What is the use of function Proc summary?

651