Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / arun kumar

proc sql;
create table arun as
select sum(case when var>=0 then var else . end) as num_p,
sum(case when var<0 then var else . end) as num_n
from a;
quit;

proc print;
run;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does proc print, and proc contents are used for?

1067


Explain input and put function?

1094


Explain the purpose of retain statement.

1014


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

1170


What do you understand by the term Normal Distribution?

932


If a variable contains only numbers, can it be a character data type?

1038


What is factor analysis?

1083


What is PROC in SAS?

1012


What is the purpose of trailing @ and @@? How do you use them?

998


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

1000


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

2158


Give some examples where proc report’s defaults are different than proc print’s defaults?

1019


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

941


What is your favorite all time computer book? Why?

2459


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

2043