Importing a Tab Delimited FileThe tab-delimited file is a special case of the text delimited file.
Let's look at the file named TXT_Practice_04.txt.
The file is a tab-delimited file. Each value is separated by a tab.
Now, when reading a tab-delimited file, you need to do two things differently:
filename txt_fl4 '/folders/myfolders/Proc Import Files/txt_practice_04.txt';
proc import datafile=txt_fl4
out = txt_fl4
dbms = tab
delimiter = '09'x;
The DBMS=TAB option tells SAS the source file is a tab-delimited file.
The '09'x is the hexadecimal representation of a tab. It tells SAS the values are separated by a tab.
The file is again imported properly into SAS.
Use Proc Import to import the TXT_Practice_05.txt.
The GUESSINGROWS option can also be used when importing text or tab delimited files.
filename txt_fl5 '/folders/myfolders/Proc Import Files/txt_practice_05.txt';
proc import datafile=txt_fl5 out = txt_fl5 dbms = tab replace; delimiter = '09'x; guessingrows = max; run;
Username or Email Address
Registration confirmation will be emailed to you.