Yes, a PUT statement - share what code you have that does not work.
Also, there's much to offer for code examples and supplemental conference topic papers available at the SAS support
http://support.sas.com/ website, either using its SEARCH facility or you can use a Google advanced search argument and include the parameter site:sas.com to limit the search to just the SAS website.
Scott Barry
SBBWorks, Inc.
Suggested Google advanced search argument, this topic / post:
data step put statement write file site:sas.com