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

Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

1528


What is the use of PROC gplot?

703


What do you code to create a macro? : sas-macro

651


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

2638


what is ae onset date n what is RDS

1991






How would you determine the number of missing or nonmissing values in computations?

704


Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks

1870


what is program data vector? : Sas-administrator

687


If money were no object, what would you like to do?

2761


How to sort in descending order?

863


What is the work of tranwrd function?

734


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1432


how are numeric and character missing values represented internally? : Sas programming

695


for report generation which one you used proc report or data_null_?

6774


How would you identify a macro variable?

714