We don't have your data to test with, but here is a push in the right direction. PROC SUMMARY will compute the values you are asking for, and the MAXID option on the OUTPUT statement. Bare bones (untested, incomplete program)could look like this:
proc summary data=have nway;
var salary;
class pnr year;
output out=want max(sakary) = maxsal maxid.........;
run;
You'll need to read about maxid, and play with it to get the final program.
... View more