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
Are you involved in writing the inferential analysis plan? Tables specfications?
How necessary is it to be creative in your work?
what does the run statement do? : Sas programming
Explain the use of proc print and proc contents?
Give an example where SAS fails to convert character value to numeric value automatically?
What is SAS? What are the functions does it performs?
how will you location sas platform applications available from web browser? : Sas-bi
What is the difference between one to one merge and match merge? Give an example.
: and & modifiers.
If a variable contains only numbers, can it be a character data type?
What is the basic syntax of a sas program?
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
Are you involved in writing the inferential analysis plan? Tables specifications?
What is the basic structure of the SAS base program?
what is function of retain statment