I want to create an application which reads spss .sav files and
extracts the metadata (data dictionary) without having to use the spss
program. By searching the web I found that one could use the
spssio32.dll to do that.
What I would like to know is if there are easier ways to perform this
task and if not could someone give me some pointers to example
programs? Ideally I would prefer examples in python or ruby.
Thanks
> What I would like to know is if there are easier ways to perform this
> task and if not could someone give me some pointers to example
> programs? Ideally I would prefer examples in python or ruby.
GNU PSPP and GNU R can read SPSS data files. PSPP uses SPSS
syntax; R uses S syntax.
--
Ben Pfaff
email: b...@cs.stanford.edu
web: http://benpfaff.org
Thanks for the quick reply Ben,
I am afraid I have not formulated my question correctly. I would like
to extract the data without any user interaction, entirely
programmaticaly. The sav files will be uploaded to a web site and I
want to extract the metadata from them and store it in a database. Can
these programs run in batch mode and export the data to a text or xml
format? If not, is my only other option to use the dll?
Thanks
> On Jan 15, 8:08 pm, Ben Pfaff <b...@cs.stanford.edu> wrote:
>> GNU PSPP and GNU R can read SPSS data files. PSPP uses SPSS
>> syntax; R uses S syntax.
>
> I am afraid I have not formulated my question correctly. I would like
> to extract the data without any user interaction, entirely
> programmaticaly. The sav files will be uploaded to a web site and I
> want to extract the metadata from them and store it in a database. Can
> these programs run in batch mode and export the data to a text or xml
> format? If not, is my only other option to use the dll?
PSPP can run in batch mode and export the data to a text format
using, say, the SYSFILE INFO command. The text format is not
particularly well-suited for programmatic interpretation,
however, which might make this option inconvenient.
R can also run in batch mode. I'm afraid I don't know what kinds
of output it offers or whether it can give full access to .sav
file metadata; all I know is the bare fact that it understands
.sav files.
If you use the i/o dll, you can keep your application stable and take
advantage of new features. If you read the binary format directly or
use an application that does not keep up to date, your output will not
reflect new features.
The last time I looked, the R SPSS file reader was quite far behind in
supporting new features. I can't speak for PSPP.
HTH,
Jon Peck
SPSS
It seems that the best solution is to use the dll after all. I will try
to use it however I still have the problem that I can't find any python
or ruby examples. I've googled but nothing came up. The best I could
find was a C# wrapper for the dll but I'm not familiar with that
language. Could you please give me some pointers to any useful
information?
> The last time I looked, the R SPSS file reader was quite far behind in
> supporting new features. I can't speak for PSPP.
The PSPP developers are happy to help out anyone who has trouble
reading SPSS files, of any version, in PSPP. We welcome bug
reports at bug-...@gnu.org or http://sv.gnu.org/p/pspp