Converting SPSS Syntax Files into SPSS Data Files
Some basic data collection programs do not generate SPSS files in the .sav
format and instead generate a file with the extension .sps
. Q can convert the .sps
files into .sav files. To do this, select Tools > Convert .sps File to .sav…. However, as a fairly general rule it is preferable to have an .sav
file rather than an .sps
file as .sps
files are more likely to have been exported with errors (when these files are generated, there are generally fewer quality control processes in place).
Tools > Convert .sps File to .sav…
This feature allows you to run .sps (SPSS syntax) files to make .sav data files for use in Q.
Only a limited subset of SPSS syntax is supported so this feature may not work on all files.
We want to support as much of SPSS syntax as is relevant to producing data files, so please send us any scripts that do not work and we will try to remedy the problems in a future version of Q, or tell you how to work around them.
This feature is intended to help users who receive .sps files and need to use their data in Q.
Limitations
- We do not support string continuation on new lines.
- Limited command support. See below.
Allowed Syntax
This page does not attempt to document SPSS syntax, it only explains which portions of SPSS syntax should work with Q.
TITLE | Ignored. |
---|---|
comments | Ignored. |
NEW FILE | Ignored; a new file is always created. |
FILE HANDLE | Only MODE=CHARACTER supported. |
GET DATA | Only /TYPE=TXT supported. Only a single delimiter character supported for ARRANGEMENT=DELIMITED. |
FILE TYPE | Supported. |
RECORD TYPE | Supported. |
DATA LIST | Supported except the END subcommand. |
BEGIN DATA...END DATA | Supported. |
VARIABLE LABELS | Supported. |
VARIABLE LEVEL | Supported. |
VALUE LABELS | Supported. |
MRSETS | Supported except for /DISPLAY and /DELETE. |
DELETE VARIABLES | Supported. |
RENAME VARIABLES | Supported. |
data formats | All formats except: IB, PIBHEX, P, PIB, Z, PK, RB, RBHEX, AHEX, JDATE, DTIME, WKDAY, MONTH, MOYR, QYR, WKYR. |
CACHE | Ignored; not applicable. |
EXECUTE | Ignored; all scripts are automatically executed. |
Further reading: SPSS Alternatives