ASCII Data Files to SPSS Data Files
You will sometimes receive data from an external
source as ASCII data, or you might create your data files in ASCII
with Notepad (or some other word processor that can output in ASCII). Examine the following SPSS data file:
ITEM ORDER GRAM RT-MS
1 80 0
1152
2 34 0
1778
3 57 0
1921
4 72 0
1561
5 62 0
1420
6 8 0
2336
The following instructions show how to create this SPSS data file from an
ASCII data file.
Creating ASCII Data Files
To
create ASCII files, click the Notepad icon in Windows and type the following
data:
1 80 0 1152
2 34 0 1778
3 57 0 1921
4 72 0 1561
5 62 0 1420
6 8 0 2336
Make sure a single space separates all individual numbers. Next, save
the data on the a: drive.
Converting ASCII Data
Files
To convert the ASCII data file to an SPSS data file, use SPSS software to
read the ASCII file. After SPSS reads the file, save the converted file in
SPSS format. Because different versions of SPSS read and save ASCII files
differently, follow the instructions that apply.
Version 8 of SPSS
- Select "Read ASCII Data" from the "File" menu
- Select the proper disk (i.e., a: drive)
- Select "freefield" data
- Select "all files" from "list of file types"
- Double-click on the filename of your ASCII data file
- When the window appears, type the name of the first variable in the data
file (i.e., "item")
- Click the "Add" button
- Type the name of the second variable (i.e., order) and click
"Add"
- Repeat until you name all of the
variables in the data file
- Click "Ok"
- Select "Save" from the "File" menu
Version 9 of SPSS
- Select "Read Text Data" from the "File" menu
- Select the drive and file to open (from the a: drive)
- "Does your file match a predefined file format?" Click "No"
and then "Next"
- "How are your variables arranged?" Click "Delimited"
- "Are variable names included at the top of your file?" Click "No"
and then "Next"
- "How are your cases represented?" Click "Each line represents
a case"
- "How many cases do you want to import?" Click "All of the cases"
and then "Next"
- "Which delimiters appear between the variables?" Click "Space" and then
"Next"
- "Specifications for variables selected in the data preview" Click
"V1" (variable one) at the bottom
of the window
- Type the first variable name (i.e., "item")
-
Click "Numeric" if the variable is a number. Click "String"
if the variable is a word
- Repeat steps (9) through (11) for the rest of the variables (V2, V3, etc.)
in the data file
- Click "Next" when finished
- "Would you like to save this file format for future use?" Click "No"
- "Would you like to paste the syntax?" Click "No" and then "Finish"