Proc Import [5-7]


Importing a Tab Delimited File

Importing a tab-delimited file is a little different than other types of text files.

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:

  • The DBMS option should be specified as TAB (not DLM). 
  • The delimiter should be specified as '09'x
Filename txt_fl4 '/home/kisumsam/proc_import/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.

Get Hint

Get Solution