Date: Thu, 24 Mar 2005 11:52:40 -0500
Reply-To: thennig@idirect.com
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Timothy Hennigar <thennig@idirect.com>
Organization: Timothy Hennigar
Subject: Re: Advice on updating multiple data files
In-Reply-To: <4242E9F7.4040605@wayne.edu>
Content-Type: text/plain; charset="us-ascii"
Sure
Presumably you have to type in the Variables Labels and Value Labels
once - you could simply save those commands in a syntax file and run
the syntax file each time you run you a job ..
ie., create a file called 'labels.sps'
inside you might have some statements like
VAR LAB id 'Id variable'.
VAR LAB weight 'weight variable'.
VAR LAB a1 'Variable a1 name'.
etc..
VAL LAB a1
1 'good'
2 'indifferent'
3 'bad'
4 'no response'.
etc ..
(its just a text file you can edit with any editor, you can also economize
on the syntax some but you get the point) ..
then when you run your job you can use the 'include' statement to first
apply your labelling, like
include 'labels.sps'.
.. other stuff ..
Now, there are new ways to use 'include' (insert), and this also seems to be
the perfect place for 'Apply dictionary' command.) Things you can experiment
with ..
If you have an spss data file with the labelling .. you can use the
'display data information' command under the file menu .. to generate the
current settings - which you could cut and paste to your syntax file .
hope this helps
go play.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Michael Kruger
Sent: Thursday, March 24, 2005 11:25 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Advice on updating multiple data files
I have an Access database that is continually being updated with about
30 separate data files that I generate Excel files and read them into
SPSS and then merge them as needed. Is there a way of creating an SPSS
syntax file that will allow me to read in an updated version of the
Excel file and apply the variable properties (Variable names, labels,
value codes, missing values) by running the syntax?
This is an ongoing project so the data is constantly changing and I will
be analyzing it periodically. The variable names in the Access file are
simple 'A1,A2,A2a,A2b, ..'
and such that they are useless for me in running and interpreting the
analyses. Being able to run a syntax dictionary command file would solve
my problem but I don't know how to get SPSS to generate it. I've tried
'Define Data Properties' but it seems to requrie matching variable names
in the file just read with the source file containing the old variable
definitions and properties. An advice would be appreciated.
--
Michael Kruger
"A True Prince"
Statistical Analyst
C.S. Mott Center
Dept. of OB/GYN
Wayne State University School of Medicine
(313)-577-1794