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

Answers were Sorted based on User's Feedback



Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 ..

Answer / naresh

data high_amount;
set amount;
if amount>paid_amount then output;
drop paid_amount;
run;

proc print;run;

Is This Answer Correct ?    1 Yes 1 No

Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 ..

Answer / ashish

data test1;
set test;
pct=(paid_amount/amount)*100;
run;

proc sort data=test1 out=test2;
by DESCENDING pct;

data test3;
set test2(obs=3);
run;

Is This Answer Correct ?    0 Yes 0 No

Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 ..

Answer / 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

More SAS Interview Questions

Give e an example of..

0 Answers  


Write a SAS macro to calculate number of numbers in an email address

2 Answers  


how does sas know on which server the piece of code to be executed ? say if a proc olap code is written then how the sas application would detect on which server to execute.

1 Answers   TCS,


What are the prime responsibilities of data integration administrator? : Sas-di

0 Answers  


How can a SAS WEB REPORT STUDIO USER identify which report tabs they have been permitted without entering the SAS WEB REPORT STUDIO

2 Answers   TCS,






In ARRAY processing, what does the DIM function do?

0 Answers  


how does sas handle missing values in functions? : Sas programming

0 Answers  


What are the analysis datasets created, and what are the new variables created in CLINICAL SAS

1 Answers   Accenture, Sciformix,


How to read an input file in sas?

0 Answers  


how to delete the duplicates by using proc sql?

3 Answers   Genpact,


What is Linear Regression?

0 Answers  


Which are SAS Windows Clients & SAS Java Clients

3 Answers   TCS,


Categories