Export a SAS Data Set into a text file
Exporting data into a text file is similar to exporting data to an Excel spreadsheet.
Proc Export Data=Income OutFile='/home/your_user_name/Income.txt'ReplaceDbms=tab;Run;
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 a tab as the data delimiter.
Need some help?
HINT:Remember to change the file extension from (xlsx) to (txt).
SOLUTION:Proc Export Data=SASHelp.ElectricOutFile='/home/your_user_name/Electric.txt'ReplaceDbms=tab;Run;
Username or Email Address
Registration confirmation will be emailed to you.