Access Keys:
Skip to content (Access Key - 0)

How can I output a data set to a text file?

To export data into a flat, text file, use SAS program like this:

        data _null_;
            set <your data set>;
            file '<your output file>' notitles noprint;
            put var1 var2 var3 ... varn;

where <your data set> is the existing SAS data set, <your output file> is the output file you want to create, and var1 - varn are the names of your variables.

Note that you do not type the angle brackets (<>), but you do need the quotation marks around the file name.

IS&T Contributions

Documentation and information provided by IS&T staff members

Last Modified:

February 25, 2009

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
olc-sas olc-sas Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
This product/service is:
Easy to use
Difficult to use

This article is:
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki