Well, I have not seen a screenshot as a question before. I assume you are asking for:
data want;
set have;
length lsttourn_no $200.;
retain lsttourn;
if tournament_no ne 0 then lsttourn=tournament_no;
run;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.