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 makes sas stand out to be the best over other data analytics tools?
What is maximum number of rows and cols can be handled in SAS?
Enlist the functions performed by sas.
For clinical entire study how many tables will create approx?
In SAS explain which statement does not perform automatic conversions in comparisons?
Give some examples where proc report’s defaults are different than proc print’s defaults?
what is change analysis in sas di ? : Sas-di
What are the implications?
sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
Describe 5 ways to do a “table lookup” in SAS?
what is the difference between floor and ceil functions in sas? : Sas-administrator
Mention the validation tools used in SAS?
how do you want missing values handled? : Sas programming