Solved

Tool to import/export value labels in SPSS

Posted on 2015-02-06
2
2,161 Views
Last Modified: 2015-02-09
Is there a tool that will allow me to import/export the embedded value labels in SPSS?

For instance, if I have a variable in SPSS called Marital_Status, it might have a value table like this:

-1 - Unanswered
1 - Single
2 - Married
3 - Divorced
4 - Widowed

I'm looking for a tool that would export the SPSS data to Microsoft Access (or SQL Server) and not only create a table in Access that has the data from the SPSS file but also export these value labels.

We have SPSS files that have hundreds of fields, most of which have embedded value labels and we're getting more SPSS files all the time. We have no problem exporting the data to Access but we lose the value labels. And because there are so many different fields that have these (with more coming in each SPSS file we receive), manually creating the subtables in Access is tedious.

A partial solution is that we can export from SPSS and have SPSS replace the numeric values with their labels, but this has two drawbacks for us:

1. In order to ensure compatibility with our data partners, we need to know both the numeric value and its label. So we would have to do two exports (one with the numeric values and one with the substituted labels) and then code to match them.

2. There's no guarantee that every value for a variable is used in the database. So a double-export would lose the labels for any unused values. This poses a problem when we're exporting data for our data partners.

Is there a way to export these tables of value labels? Either through code in SPSS or through some third-party tool? I tried StatTransfer, but it doesn't have this feature and their tech support says that they don't have any plans to add it.

Thanks in advance.
0
Comment
Question by:jrmcanada2
2 Comments
 
LVL 9

Accepted Solution

by:
richdiesal earned 500 total points
ID: 40595805
The term you are looking for is the "data dictionary."  That is what you want to export.

I suspect the easiest way would be SPSS syntax with the OMS command.  This will get you what you want.  There are alternative formats (other than HTML), but I'd recommend checking the syntax manual on OMS for whatever else you need.  Note that you'll need to change the OUTFILE and FILE references to whatever file you want to export to and from, respectively.

OMS
 /SELECT TABLES
 /IF COMMANDS = ["Sysfile Info"]
     SUBTYPES = ["Value Labels"]
 /DESTINATION FORMAT = HTML
  IMAGES = NO
  OUTFILE = "D:\Temp\dataexport.html".
SYSFILE INFO FILE="D:\Temp\test.sav".
OMSEND.

Open in new window

0
 

Author Comment

by:jrmcanada2
ID: 40598217
Thank you! This sounds perfect. We'll try it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pre-Linear Regression Tests 2 25
subtr returning incorrect value 8 31
Supermicro 91 error 8 36
Import text from rows into columns? 12 41
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question