Difference between revisions of "Importing a SLICE file into SPSS"
(Created page with "Due to changes in the SPSS import methodology, it is possible that when attempting to run the syntax (.SPS) in SPSS to import an mTAB Sliced data file, error messages may be d...") |
|||
Line 17: | Line 17: | ||
The syntax will look like the following example. | The syntax will look like the following example. | ||
+ | [[File:Slice importing-a-slice-file-into-SPSS SPSS.jpg|thumb|center|x350px]] | ||
FILE HANDLE MTAB /NAME='mTAB_Demonstration_DB_-_Current_Year.DAT' /LRECL=168. | FILE HANDLE MTAB /NAME='mTAB_Demonstration_DB_-_Current_Year.DAT' /LRECL=168. | ||
+ | |||
DATA LIST FREE FILE=MTAB / | DATA LIST FREE FILE=MTAB / | ||
+ | |||
ID (N) | ID (N) | ||
+ | |||
V1 (F9.4) | V1 (F9.4) | ||
+ | |||
V2 (A7) | V2 (A7) | ||
+ | |||
V3 (N) | V3 (N) | ||
+ | |||
V4 (N) | V4 (N) | ||
+ | |||
V5 (N) | V5 (N) | ||
+ | |||
V6 (N) | V6 (N) | ||
+ | |||
V7 (N) | V7 (N) | ||
+ | |||
V8 (N) | V8 (N) | ||
+ | |||
V9 (N) | V9 (N) | ||
+ | |||
V10 (N) | V10 (N) | ||
Line 41: | Line 54: | ||
− | For example, if the Sliced file was downloaded to your Desktop, It would actually be | + | For example, if the Sliced file was downloaded to your Desktop, It would actually be '''C:\Documents and Settings\''NAME''\Desktop\''' |
− | '''C:\Documents and Settings\''NAME''\Desktop\''' | + | |
Line 53: | Line 65: | ||
Next, change the opening line in the syntax from: | Next, change the opening line in the syntax from: | ||
'mTAB_Demonstration_DB_-_Current_Year.DAT’ | 'mTAB_Demonstration_DB_-_Current_Year.DAT’ | ||
− | to: | + | to: ‘C:\Documents and Settings\'''''NAME'''''\Desktop\mTAB_Demonstration_DB_-_Current_Year.DAT’ |
− | + | ||
− | ‘C:\Documents and Settings\'''''NAME'''''\Desktop\mTAB_Demonstration_DB_-_Current_Year.DAT’ | + | |
Substitute '''''“NAME”''''' in the above example for your specific folder name. | Substitute '''''“NAME”''''' in the above example for your specific folder name. | ||
− | + | [[File:Slice importing-a-slice-file-into-SPSS name.jpg|thumb|center|x150px]] | |
Please make a note of the new location of the single quotes. They are now moved to just before C: | Please make a note of the new location of the single quotes. They are now moved to just before C: | ||
Line 68: | Line 78: | ||
Run the syntax file again in SPSS by clicking RUN-ALL. | Run the syntax file again in SPSS by clicking RUN-ALL. | ||
− | The syntax file should now run and the Sliced data should import into SPSS | + | The syntax file should now run and the Sliced data should import into SPSS. |
+ | |||
+ | [[File:Slice importing-a-slice-file-into-SPSS final-image.jpg|thumb|center|x350px]] |
Revision as of 11:18, 29 July 2013
Due to changes in the SPSS import methodology, it is possible that when attempting to run the syntax (.SPS) in SPSS to import an mTAB Sliced data file, error messages may be displayed. These errors prevent SPSS from loading the Sliced data file. The root cause is simply that SPSS does not know where to locate the data (.DAT) file associated with this syntax.
The following steps address how to rectify this and import the mTAB Sliced file into SPSS.
When you run the syntax (.SPS) file provided by mTAB, messages similar to the following may appear in the SPSS Viewer.
Error # 31 in column 21. Text: MTAB >File not found. >Execution of this command stops.
Error # 100. Command name: VALUE LABELS >This command is not permitted before the beginning of file definition >commands. >Execution of this command stops.
If this occurs, editing the syntax (.SPS) that was generated from the Slice process will resolve the error messages. Begin by opening the syntax (.SPS) file that was created during the Slice process.
The syntax will look like the following example.
FILE HANDLE MTAB /NAME='mTAB_Demonstration_DB_-_Current_Year.DAT' /LRECL=168.
DATA LIST FREE FILE=MTAB /
ID (N)
V1 (F9.4)
V2 (A7)
V3 (N)
V4 (N)
V5 (N)
V6 (N)
V7 (N)
V8 (N)
V9 (N)
V10 (N)
In this example, the Sliced Data file is named, 'mTAB_Demonstration_DB_-_Current_Year.DAT’
Identify where you have placed the downloaded Slice data (.DAT) file. In most instances, the file will download to the Desktop.
Modify the first line of the syntax by specifying the location of the file before the file name.
For example, if the Sliced file was downloaded to your Desktop, It would actually be C:\Documents and Settings\NAME\Desktop\
Substitute “NAME” in the above example for your specific folder name. This varies for each person.
Also if the Sliced file was not downloaded to your computer’s hard drive, you will need to change C: to the network or other drive letter.
Next, change the opening line in the syntax from:
'mTAB_Demonstration_DB_-_Current_Year.DAT’
to: ‘C:\Documents and Settings\NAME\Desktop\mTAB_Demonstration_DB_-_Current_Year.DAT’
Substitute “NAME” in the above example for your specific folder name.
Please make a note of the new location of the single quotes. They are now moved to just before C:
When the edits are complete, save the changes to the syntax file (.SPS)
Run the syntax file again in SPSS by clicking RUN-ALL.
The syntax file should now run and the Sliced data should import into SPSS.