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

Explain input and put function?

0 Answers  


What are the Aggregate functions in SQL ?

2 Answers   AON,


what is hash files in sas and why we are using this one in sas?

0 Answers   L&T, SAS,


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

0 Answers  


1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Data Steps? Can we _NULL_ in Proc Steps also? 3.How do call the macro variable in Data Steps? 4.How to construct Pivot tables in Excel Using SAS?

3 Answers  






How do you delete duplicate observations in sas?

0 Answers  


In this question, I rename the numeric variable phone to numphone and then try use phone=put(numphone,comma16.) to store the numeric value numphone as a string value in phone. But I get a warning tha numphone already exists and in the data sat phone doesnt exist and numphone is set to missing. Why? data names_and_more; input Name $20. Phone : comma16. Height & $10. Mixed & $8.; Name = tranwrd(Name,' ',' '); rename phone = numphone; phone = put(numphone,comma16.); datalines; Roger Cody 9,087,821,234 5ft. 10in. 50 1/8 Thomas Jefferson 3,158,488,484 6ft. 1in. 23 1/2 Marco Polo 8,001,234,567 5Ft. 6in. 40 Brian Watson 5,183,551,766 5ft. 10in 89 3/4 Michael DeMarco 4,452,322,233 6ft. 76 1/3 ;

1 Answers  


Which are SAS Windows Clients & SAS Java Clients

3 Answers   TCS,


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?

0 Answers  


How can you create a macro variable with in data step? : sas-macro

0 Answers  


What would the following datastep do? Data _null_; Set Dist end=eof; Call Symput("xx"!!left(put(_n_,2.)),&dimension); If EOF then Call Symput('numrows',left(put(_n_,2.))); Run; dimension is a macro variable that is being passed here

2 Answers  


How do you write a test plan?

1 Answers   Oracle,


Categories