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

How do dates work in SAS data?

1113


Give e an example of..

2272


Name some categories in sas 9? : sas-grid-administration

912


Mention what is the difference between nodupkey and nodup options?

952


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

1000


what are the scrubbing procedures in sas? : Sas programming

1221


What is the length assigned to the target variable by the scan function?

1091


What do you know about symput and symget?

1161


What is substr function?

1112


What do you know about sas data set?

1018


What is run-group processing?

1088


What are the difficulties u faced while doing vital signs table or dataset?

2335


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

1211


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

2434


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

1119