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
explain the difference between proc means and proc summary?
name several ways to achieve efficiency in your program? : Sas programming
how to read the variables in sas? : Sas-administrator
What is SAS informats?
How are numeric and character missing values represented internally?
For clinical entire study how many tables will create approx?
What is a pdv and what are its functions?
Have you ever used the SAS Debugger?
what other sas products have you used and consider yourself proficient in using? : Sas programming
How to limit decimal places for the variable using proc means?
what is slowly changing dimension? : Sas-di
Explain the main difference between the sas procedures and functions? : Sas-administrator
what are validation tools that are used in sas? : Sas-administrator
What are the statements in proc sql?
how does sas handle missing values in assignment statements? : Sas programming