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

Are you involved in writing the inferential analysis plan? Tables specfications?

2172


How necessary is it to be creative in your work?

2424


what does the run statement do? : Sas programming

990


Explain the use of proc print and proc contents?

905


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

1027


What is SAS? What are the functions does it performs?

1138


how will you location sas platform applications available from web browser? : Sas-bi

1013


What is the difference between one to one merge and match merge? Give an example.

997


: and & modifiers.

1335


If a variable contains only numbers, can it be a character data type?

1033


What is the basic syntax of a sas program?

1141


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

1012


Are you involved in writing the inferential analysis plan? Tables specifications?

3898


What is the basic structure of the SAS base program?

1230


what is function of retain statment

1976