Export a SAS Data Set into a Text fileExporting the data into a Text file is similar to an Excel spreadsheet.
Proc Export Data=Income OutFile='/folders/myfolders/Income.txt'ReplaceDbms=tab;Run;
[Note: The code above might get cut off due to shortened screen's width. Expand the web page for this session if needed.]
Pay attention to the following when exporting to a Text file:
1. File ExtensionUse (.txt) as the file extension when exporting to a Text file.
2. DBMS optionYou can use the DBMS option to select the type of delimiter when exporting to a Text file.
DBMS=tabThis will create a tab-delimited file.
DBMS=csvThis will create a comma-delimited file.
Export the ELECTRIC data set into a Text file.
Use Tab as the data delimiter.
Need some help?
HINT: Remember to change the file extension from (xls) to (txt).
SOLUTION: Proc Export Data=SASHelp.Electric OutFile='/folders/myfolders/Electric.txt' Replace Dbms=tab; Run;
Username or Email Address
Registration confirmation will be emailed to you.