LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 Jun 2005 13:56:21 -0400
Reply-To:     Richard Ristow <wrristow@mindspring.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Richard Ristow <wrristow@mindspring.com>
Subject:      Re: Display dictionary
Comments: To: Steve Powell <steve@promente.org>
In-Reply-To:  <200506220853.j5M8r0sT003800@listserv.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 04:53 AM 6/22/2005, Steve Powell wrote:

>You say that the SPSS advice is to "use OMS to direct DISPLAY >DICTIONARY output to an appropriate file to be read back in". Do you >mean that it should be possible to read information back from some >table produced by OMS in order to (re-)define variable properties in >the same way that APPLY DICTIONARY does? This would be a big step >forward. That way it should be pretty easy to define a dataset using a >tool like MS Access rather than the clumsy interface available in SPSS.

Well, I've said that's the advice, but I've never had access to an SPSS version with OMS to try it. At the end of this note I'm appending a brief exchange in which Jon Peck of SPSS, Inc., gave advice on how to do it.

>Our problem is that as psychologists we deal with datasets with quite >large numbers of variables which are quite highly structured (sets of >questionnaires with sections and subsections and sub-sub-sections >etc.). We have a tool in MS ACCESS which can quite nicely develop and >produce corresponding .sav files . The problem comes when the data >analysis begins - as soon as one succumbs to the temptation to >manipulate the dictionary directly in spss (e.g. by defining a >composite score variable) then the link between the metadata in Access >and the .sav file is lost. It would be wonderful if there was a way to >read the revised metadata back in to the Access database.

It would be wonderful, indeed. And very useful, for that and many other purposes.

Now, this is way off what you asked, and nobody likes a response of the form "just do it completely differently," but here's what I'd do with your problem.

I wouldn't expect people not to "succumb to the temptation to manipulate the dictionary directly in spss (e.g. by defining a composite score variable)". You almost certainly need to do such things for analysis, and in many ways SPSS is the easier tool to use.

So, I might do this: A. *Never* modify the SPSS .sav files created from the Access tables, so those metadata correspondences stay good. B. So, when creating derived variables (which you'll almost certainly need to do), save them in new .SAV files containing only the derived variables, plus the key variables needed to match back to the original data. C. Keep an SPSS variable naming convention so that you'll never get the same name used for different purposes in your SPSS .sav files. (The same names will be used in different files for the SAME purposes, notably key variables.) D. Import the .SAV files with the derived variables back into Access, as new tables. Then, you can use Access's own (admittedly clumsy) tools to extract the dictionary information.

Now, in a reasonable world, the SPSS variable name would become the Access field name, and the SPSS variable label would become the Access "description". I've only done Access->SPSS, not the reverse, but I'll bet the world isn't reasonable in that particular way. But this would get you SOME part of the way.

>-----Original Message----- >From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf >Of >Richard Ristow >Sent: 21 June 2005 21:52 >To: SPSSX-L@LISTSERV.UGA.EDU >Subject: Re: Display dictionary > >At 11:28 AM 6/17/2005, Patricia Cleland wrote: > > >In the past SPSS printed out the dictionary information in a single > >output, that is with all the variable information (var name, var > >label, position, format, width, value labels). > > > >I've just downloaded the demo of V13, and DISPLAY DICTIONARY > generates > >two tables, one with the variable information and one with the value > >labels. Is there are way to get all the information in one table? > >I haven't had a chance to try it, but there's Scott Czepiel's Perl >utility for extracting SPSS dictionary information from a .SAV file: >sSee posting "Fwd: Extract metadata from SPSS SAV files using Perl", >Fri, 17 Jun 2005 09:38:26. I'd be interested to see how well it works. > >SPSS has been, well, pretty awful about giving program access to the >data dictionary. Good old SAS's PROC CONTENTS can give you the whole >dictionary as a SAS dataset (equivalent to a .SAV file), and you can >manipulate it, print it, generate code from it, as you like. I >understand that the current advice for SPSS is to use OMS to direct >DISPLAY DICTIONARY output to an appropriate file to be read back in. >It >seems like the long way around. (But, by the way, has anybody made >THIS >work?)

..................................................... APPENDIX: Jon Peck, on OMS for dictionary information.

Original question: ----------------- From: SPSSX(r) Discussion Sent: Donnerstag, 2. Dezember 2004 06:56 To: SPSSX-L@LISTSERV.UGA.EDU Subject: value labels -> sav file with oms

Dear Members,

How can I get an variable value labels's in an other sav file? I tried with oms command, but I did'nt manage to do this.

Here is my attempt:

oms / if commands=['File Information'] / destination format=sav outfile='D:\TERMEKKUT\labeles\temp1.sav' . display dicitonary /variables = helysz. omsend.

In the temp1.sav file there are almost everything, except for value labels. Any idea?

Jon Peck's reply: ---------------- Date: Thu, 2 Dec 2004 08:01:13 -0600 From: "Peck, Jon" <peck@spss.com> Subject: Re: value labels -> sav file with oms To: SPSSX-L@LISTSERV.UGA.EDU X-ELNK-AV: 0

You are close, but since Display Dictionary produces several tables of differing formats, select the labels subtype only. For example,

oms / if commands=['File Information'] subtypes=['Variable Values'] / destination format=sav outfile='c:\temp\labels.sav' .

Regards, Jon Peck SPSS

-----Original Message-----


Back to: Top of message | Previous page | Main SPSSX-L page