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

To what type of programms have you used scratch macros?

2526


How sas treats the dsd delimiters?

1152


explain what is data set in sas? : Sas-administrator

911


How do you define proc in sas? : sas-grid-administration

1029


What are the difference between the sas data step and sas procs?

1102


Give an example where SAS fails to convert character value to numeric value automatically?

1027


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

992


how sas deals with business intelligence? : Sas-bi

998


what can you learn from the sas log when debugging? : Sas programming

1023


What are the different versions of sas that you have used until now? : sas-grid-administration

1273


I need level 2 to 5 sas using companies in india

2327


what do the sas log messages "numeric values have been converted to character" mean? : Sas programming

968


What is the difference between order and group variable in proc report?

1365


What is the purpose of _character_ and _numeric_?

1012


what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

2125