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 is sas metadata server? : Sas-di

1097


What do the SAS log messages "numeric values have been converted to character" mean?

1369


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

975


What is factor analysis?

1124


How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?

1662


Enlist the syntax rules followed in sas statements.

1076


What is the difference between the proc sql and data step?

1167


What is the role of sas grid administrator? : sas-grid-administration

1278


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

2237


How do you control the number of observations and/or variables read or written?

1245


How you can read the variables that you need?

1118


how does sas handle missing values in sort order? : Sas programming

909


What makes sas stand out to be the best over other data analytics tools?

1053


What is the command used to find missing values?

1093


How do you test for missing values?

1623