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 / mahesh babu b
data test1;
set a;
if find(var,'-') >0 then b=var;
else c=var;
run;
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
What do the mod and int function do? : Sas programming
What is the purpose of trailing @ and @@? How do you use them?
Mention how to limit decimal places for the variable using proc means?
What does the trace option do?
What are the difference between sas functions and procedures?
How to create an external dataset with sas code?
explain about data integrator metadata reports? : Sas-di
what is SAS OPTIMIZATION?
How does proc sql work?
what are sas bi dashboard components? : Sas-bi
What do you code to create a macro? : sas-macro
how are numeric and character missing values represented internally? : Sas programming
what is sas business intelligence? : Sas-bi
Can you execute macro within another macro? : sas-macro
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation