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 / karthik

data a;
input var;
cards;
0
1
2
3
-1
-2
-3
;
data report;
set a;
if var>=0 then var1=var;
else var2=var;
drop var;
run;
/*Report output*/
proc print data=report;
run;

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the component of range? : Sas-bi

1081


Describe a time when you were really stuck on a problem and how you solved it?

2544


What are the differences between proc means and proc summary?

1127


What is the command used to find missing values?

1093


what is the use of proc sql? : Sas programming

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?

1664


where are dashboard components are created and maintained? : Sas-bi

1008


for whom is sas data integration studio designed? : Sas-di

993


Explain data step in SAS

1073


what are informats in sas? : Sas-administrator

1083


Mention what is the difference between nodupkey and nodup options?

1004


what is the difference between nodup and nodupkey options? : Sas programming

1179


How do dates work in SAS data?

1165


Describe the ways in which you can create macro variables?

1182


what is the use of proc contents and proc print in sas? : Sas-administrator

1047