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


Please Help Members By Posting Answers For Below Questions

how to do user inputs and command line arguments in sas?

2427


which date function advances a date, time or datetime value by a given interval? : Sas programming

589


What are the applications primarily used by business analyst? : Sas-bi

550


Explain what Proc glm does?

633


Explain data_null_?

608






what is the purpose of _error_? : Sas programming

606


what is change analysis in sas di ? : Sas-di

603


How does proc sql work?

611


what is sas database server? : Sas-di

611


What are the uses of sas?

701


Did you used proc test? when?

1573


What are common programming errors committed in sas

667


Describe the function and untility of the most difficult SAS macro that you have written.

1556


What is maximum storage capability of SAS?

904


How to create an external dataset with sas code?

583