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

Explain the purpose of retain statement.

787


how does sas handle missing values in procs? : Sas programming

859


What is the difference between INPUT and INFILE ?

968


what is sas and what are the functions? : Sas-administrator

732


Mention some common errors that are usually committed in sas programming.

795


what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

843


How to create a permanent sas data set?

858


This entry was posted in General. Bookmark the permalink. Post a comment or leave

4321


Mention the validation tools used in SAS?

838


How many ways to overcome a missing values???

2538


In proc transpose and data step with arrays which one you pick?

2772


What are the features of SAS?

777


do you prefer proc report or proc tabulate? Why? : Sas programming

764


What sas features do you use to check errors and data validation?

943


AE datasets names? how many types?

2244