I would use PROC SQL, like this:
data have;
infile datalines;
input year code:$3. industry:$1. Value;
datalines;
2016 001 A 800
2017 001 A 900
2018 001 A 1700
2016 002 A 1200
2017 002 A 1500
2018 002 A 1100
2016 003 B 600
2017 003 B 1400
2018 003 B 950
2016 004 B 780
2017 004 B 1200
2018 004 B 3000
;
proc sql;
create table want as
select Year, Code, Industry, max(Value) as MaxValue
from have
group by Year, Code, Industry
;
quit;
Yields:
Want
2016 |
001 |
A |
800 |
2016 |
002 |
A |
1200 |
2016 |
003 |
B |
600 |
2016 |
004 |
B |
780 |
2017 |
001 |
A |
900 |
2017 |
002 |
A |
1500 |
2017 |
003 |
B |
1400 |
2017 |
004 |
B |
1200 |
2018 |
001 |
A |
1700 |
2018 |
002 |
A |
1100 |
2018 |
003 |
B |
950 |
2018 |
004 |
B |
3000 |
Hope this helps!