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

describe the interaction table in sas di? : Sas-di

597


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

1668


hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?

1690


it will become easy if uuu provide website linkssss and list of consultanciessssss

1535


What is the difference between nodupkey and nodup options?

599






what is PhaseIII, ODS, TLG, Macro and Proc in SAS

3909


What is the difference between input and infile statement?

686


What does the RUN statement do?

855


what is the function of catx syntax? : Sas-administrator

654


what is the primary data source for the wrs? : Sas-bi

661


What do the PUT and INPUT functions do?

784


Mention how to limit decimal places for the variable using proc means?

647


Do you know the features of sas?

598


What are the features of SAS?

582


explain the difference between proc means and proc summary?

675