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


Please Help Members By Posting Answers For Below Questions

What is the purpose of trailing @ and @@? How do you use them?

603


Can you explain the process of calendar?

626


what are input dataset and output dataset options? : Sas programming

548


Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

1760


Name few SAS functions?

659






Difference between informat and format?

631


name the scheduler for scheduling job and explain the scheduler? : Sas-di

577


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

571


what is data governance? : Sas-di

613


: and & modifiers.

854


Did you used proc test? when?

1564


what are the benefits of data integration? : Sas-di

529


Mention the category in which sas informats are placed?

618


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

596


what is sas metadata server? : Sas-di

571