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 is the difference between one to one merge and match merge? Give an example.

1070


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

1042


Explain what Proc glm does?

1221


What is the difference between nodupkey and nodup options?

1044


explain the use of % includes a statement in sas? : Sas-administrator

1008


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

1017


What are the uses of sas?

1278


List down the reasons for choosing sas over other data analytics tools.

1289


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1621


What is the difference between reading data from an external file and reading data from an existing data set?

1186


For clinical entire study how many tables will create approx?

1974


Mention what is PROC in SAS?

1062


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

1085


What is a pdv and what are its functions?

1157


If you could design your ideal job, what would it look like?

2931