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
How substr function works in sas?
What would you change about your job?
how many types of prompts are there? : Sas-bi
How do dates work in SAS data?
If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?
what is the difference between nodup and nodupkey options? : Sas programming
for report generation which one you used proc report or data_null_?
how does sas handle missing values in a merge? : Sas programming
Describe crosslist option in tables statement?
What is the use of function Proc summary?
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5
What is the role of unrestrictive users? : sas-grid-administration
What can be the size of largest dataset in SAS?
What are the ways in which macro variables can be created in sas programming?
what is enterprise guide? What is the use of it? : Sas programming