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 is the purpose of trailing @ and @@? How do you use them?
Can you explain the process of calendar?
what are input dataset and output dataset options? : Sas programming
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?
Name few SAS functions?
Difference between informat and format?
name the scheduler for scheduling job and explain the scheduler? : Sas-di
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
what is data governance? : Sas-di
: and & modifiers.
Did you used proc test? when?
what are the benefits of data integration? : Sas-di
Mention the category in which sas informats are placed?
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
what is sas metadata server? : Sas-di