how to add distinctly var variable values ex..
Data a;
input var;
datalines;
0
1
2
3
-1
-2
-3
;
run;
adding all +ve value in one varibale n do the same for -ve
too
Answer Posted / ravikumar marappan
data test;
input var;
retain sub;
retain ad;
if var < 0 then sub=sum(sub,var);
else ad=sum(ad,var);
datalines;
1
2
3
-1
-2
-3
;
run;
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is factor analysis?
what are informats in sas? : Sas-administrator
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
Give e an example of..
Mention how to limit decimal places for the variable using proc means?
How to create list output for cross-tabulations in proc freq?
What are the special input delimiters used in SAS?
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
what other sas products have you used and consider yourself proficient in using? : Sas programming
What is the difference between proportion and average?
what can you learn from the sas log when debugging? : Sas programming
Do you need to rearrange the order of the data for the report?
how to read the variables in sas? : Sas-administrator
Approximately what date is represented by the SAS date value of 730?
Describe a time when you were really stuck on a problem and how you solved it?