Nothing wrong with your code! Your problem is in creating file L .. it is only reading in two records. Try your code with the following:
data l;
infile cards truncover;
input age no id$;
cards;
4 1 nani
5 2
6 3 rja
run;
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.