In a shcool there are 1000 students. After completion of
every test in 6 subjects , each subject teacher submit the
marks of every student at different times and loaded in the
database commonly. How will you seperate the top two
subject marks for each each studet using SAS?
Answer Posted / ashutosh
slightly modified
data nrate;
set rating;
array r{6} a -- f;
do i=1 to 6;
*for first maximum;
if r{i}>max1 then
do
max2=max1;
max1=r{i};
end;
*for second maximum;
if r{i}>max2 and r{i}<max1 then max2=r{i};
end;
proc print data=nrate;
run;
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
what are informats in sas? : Sas-administrator
What is the use of stop statement?
What versions of SAS have you used (on which platforms)?
What are types of transport files?
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?
Name and describe few sas character functions that are used for data cleaning in brief.
what type of graphs we will create(for 2+years candidates)?
what is change analysis in sas di ? : Sas-di
Briefly explain input and put function?
What sas features do you use to check errors and data validation?
What is SAS?
What is the difference between using drop = data set option in data statement and set statement?
Explain how merging helps to combine data sets.
What is the purpose of trailing @ and @@? How do you use them?
how do you test for missing values? : Sas programming