Try something like...
VARSTOCASES
/MAKE eg FROM eg1 eg2 eg3
/MAKE sg FROM sg1 sg2 sg3
/MAKE t FROM t1 t2 t3
/KEEP=SIC ae as
/INDEX = v123 "Variable indicating if it is 1, 2 or 3"
/NULL = DROP.
You'll need to add more /MAKE commands if there are more variables.
The /KEEP indicates variables that are FIXED (the same for all records
for the same client (i.e. SIC?))
The /INDEX variable name can change if you want to call it something
else (I believe you can omit it.)
The /NULL command says that if a record is missing (that is there is no
value for eg3, sg3 and t3) it will not create a new row. If you want
them, use /NULL = KEEP.
Melissa
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
Baglioni, Tony
Sent: Wednesday, December 06, 2006 11:43 AM
To:
[hidden email]
Subject: [SPSSX-L] Restructuring data
All,
I am trying to restructure a data file using the wizard and I'm banging
my head against it. I have data that looks like this:
SIC eg1 eg2 eg3 sg1 sg2 sg3 ae as t1 t2 t3
What I need is data that looks like this:
SIC eg sg ae as t
a 1 1 # # 0
b 2 2 # # 1
c 3 3 # # 2
Any help is much appreciated.
Tony
A. J. Baglioni, jr.
Assistant Professor
McIntire School of Commerce
University of Virginia
434 924-4961
PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.