Lesson 3.3: Importing data from text file
This lesson will explain how to import data from a tap-delimited text file. This can be done using the ‘infile’ statement we learned from the previous section.
Below is the text file that I am going to read into SAS:
DELIMITER = "09"x
INPUT Name $ Score;
Again, this is nearly the same as the codes we used when importing a csv file. What you need to pay attention here is the delimiter statement:
‘09’x here is the code for tap delimiter. The common delimiters used are Comma ( , ), Tilda (~) and Tap (‘09’x).
DONE! You have learned how to import data from a text file.