Hi, I have one dataset, could you please ans for this.
id amount paid_amount
1 700 400
2 900 250
3 300 300
a 400 250
b 500 320
c 800 650
x 200 190
y 900 250
z 300 180
i want create new dataset having id and paid_amount who are
paid high amount comparing amount.
ex: 1d paid_amount
3 300
c 650
x 190
Answer Posted / pavan
data inter7;
input id $1-2 sal1 6-9 sal2 13-16;
cards;
1 700 400
2 900 250
3 300 300
a 400 250
b 500 320
c 800 650
x 200 190
y 900 250
z 300 180
;
run;
data inter8 ;
set inter7;
if sal1>=sal2 then sal=sal1;
if sal2>=sal1 then sal=sal2;
run;
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
what are the benefits of data integration? : Sas-di
How would you include common or reuse to be processed along with your statements?
what is the effect of the options statement errors=1? : Sas programming
If you could design your ideal job, what would it look like?
How would you identify a macro variable? : sas-macro
What function CATX syntax does?
where to use sas business intelligence? : Sas-bi
What are the different versions of sas that you have used until now? : sas-grid-administration
Explain proc univariate?
what is data integration? : Sas-di
what are _numeric_ and _character_ and what do they do? : Sas programming
explain the use of % includes a statement in sas? : Sas-administrator
how do you test for missing values? : Sas programming
What is the difference between where and if statement?
What is the difference between one to one merge and match merge? Give an example.