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 are the scrubbing procedures in sas?

572


Which statement does not perform automatic conversions in comparisons?

1202


How to sort in descending order?

794


What are the different servers in sas? : sas-grid-administration

600


what is the Population you used in your project, is it ITT or PP?

2181






What are the default statistics that proc means produce?

604


How to specify variables to be processed by the freq procedure?

616


what is sas data set?

667


List down the reasons for choosing sas over other data analytics tools.

806


Give an example where SAS fails to convert character value to numeric value automatically?

608


What is the difference between match merge and one to one merge?

691


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

544


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

728


I need level 2 to 5 sas using companies in india

1932


explain the function of substr in sas? : Sas-administrator

556