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
How do dates work in SAS data?
Give e an example of..
Name some categories in sas 9? : sas-grid-administration
Mention what is the difference between nodupkey and nodup options?
What makes sas stand out to be the best over other data analytics tools?
what are the scrubbing procedures in sas? : Sas programming
What is the length assigned to the target variable by the scan function?
What do you know about symput and symget?
What is substr function?
What do you know about sas data set?
What is run-group processing?
What are the difficulties u faced while doing vital signs table or dataset?
List down the reasons for choosing sas over other data analytics tools.
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;
What is the difference between reading data from an external file and reading data from an existing data set?