You must code an OUTPUT statement. A SAS DATA step does have an implicit output operation but since you are in your DO/END loop technique, the only output would occur when the last statement is executed.
Scott Barry
SBBWorks, Inc.
Suggested Google advanced search argument, this topic / post:
data step output statement site:sas.com
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.