Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / ashokmudrathi

data rating;
input a b c d e f;
cards;
1 54 21 5 7 2
2 21 54 67 3 5
;
*here 1000 observations with above variables;

data nrate;
set rating;
array r{6} a -- f;
do i=1 to 6;
*for first maximum;
if r{i}>max1 then max1=r{i};
*for second maximum;
if r{i}>max2 and r{i}<max1 then max2=r{i};
end;

proc print;
run;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many data types are there in SAS?

1135


What is SAS informats?

1165


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

1104


Did you used proc test? when?

2091


What is a macro routine?

2792


How are numeric and character missing values represented internally?

1714


How do you test for missing values?

1690


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1591


For what purposes have you used sas macros? : sas-macro

1051


what do you mean by data staging area? : Sas-di

1195


Difference between SAS STATA & SPSS?

1181


what are the best practices to process the large data sets in sas programming? : Sas-administrator

1078


This entry was posted in General. Bookmark the permalink. Post a comment or leave

4628


what are 5 ways to perform a table lookup in sas? : Sas-administrator

1297


Tell me more about the parameters in macro? : sas-macro

1095