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
Name few SAS functions?
What do the SAS log messages "numeric values have been converted to character" mean?
what is the difference between nodup and nodupkey options? : Sas programming
what is SAS OPTIMIZATION?
what is business intelligence? : Sas-bi
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
Which statement does not perform automatic conversions in comparisons?
how will you location sas platform applications available from web browser? : Sas-bi
what is intially documentation in sas?
What commands are used in the case of including or excluding any specific variables in the data set?
What is the work of tranwrd function?
Tell e how how dealt with..
How do you convert basic cube to transaction cube and transaction cube to basic cube?
it will become easy if uuu provide website linkssss and list of consultanciessssss
What does proc print, and proc contents are used for?