Date: Wed, 2 Jan 2008 16:12:46 -0600
Reply-To: "Oliver, Richard" <roliver@spss.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Oliver, Richard" <roliver@spss.com>
Subject: Re: V16 Problem With Merge Files -solved
In-Reply-To: A<40A4A53F5727324F8ADCDF4A219CF68193D0CE@mail5.worldatwork.org>
Content-Type: text/plain; charset="us-ascii"
There may be a bug in the dialog UI for Match Files (Merge Files>Add Variables), but the Match File command itself is not case-sensitive in regard to matching variable names. The following example works correctly in SPSS 16:
data list free /idvar var1.
begin data
1 1 2 2 3 3
end data.
sort cases by idvar.
dataset name one.
data list free /IDVAR var2.
begin data
1 4 2 5 3 6
end data.
sort cases by IDVAR.
dataset name two.
match files file=one /file=*
/by IdVaR.
execute.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Brian Moore
Sent: Wednesday, January 02, 2008 2:38 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: V16 Problem With Merge Files -solved
Hi all-
Turns out that for variables to be identical for matching purposes they
must be of the same CASE, though the GUI does successfully recognize
them as identical in the first part [won't both be allowed to be in the
merged file].
This may not be new with v16, but I'd like to vote that this be declared
a bug [at a minimum that all pieces of the same command have similar
standards whatever they are declared to be].
Anyway - thanks Jim for your suggestion and all of you for this great
forum.
Regards,
Brian
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Marks, Jim
Sent: Monday, December 31, 2007 3:30 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: V16 Problem With Merge Files
Brian:
My help file for V15 says
RENAME ranames variables on the input files before they are
processed by MATCH FILES
Your error msg matches this-- it says that "cust" doesn't exist in the
second input file. That is the result of the RENAME command-- the
variable cust no longer exists in the version of the file to be matched.
I tried this syntax with V15 and reproduced the error. I'm surprised the
syntax works sometimes-- when it works is the rename and drop used on
the matching variable?
--jim
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Brian Moore
Sent: Monday, December 31, 2007 4:07 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: V16 Problem With Merge Files
Hi all-
I am having some problems with file matching in V16 that worked with my
syntax from V15. But sometimes (other pairs of files) matching is
working, so the command isn't completely lost.
The variable in question is in both files & numeric in both. In fact I
used the GUI to generate the syntax below [which means the variable was
found in both files to ALLOW it to be moved into the key variables area
in the lower right].
Anyone see the problem or know if this is patchable?
**one last note, for "fun" I tried making the linkage in both directions
(having file 1 open vs. having file 2 open) and in BOTH cases I get the
same error message that the Input2 variable is the one missing.
Thanks,
Brian
MATCH FILES /FILE=*
/FILE='J:\Strategic Product Alignment\Active Products-2007\PC 84-
Webinar '+
'Analysis\FirstWebinarPurchase.sav'
/RENAME (Cust = d0)
/BY cust
/DROP= d0.
Variable(s) incorrectly used in 'BY'
------Input1------
------Input2------
Result Type Variable name
Type Variable name
cust num cust
(missing)
Codes: num = numeric; sn = string of length n
>Error # 5126
>The BY variable list is invalid. All the variables on the list must
exist on
>all the input files, and each variable must be of the same type
(numeric, or
>strings of the same length) on all the input files.
>This command not executed.
>Note # 5145
>The working file has been restored, and subsequent commands may access
the
>working file.
EXECUTE.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list
of commands to manage subscriptions, send the command INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list
of commands to manage subscriptions, send the command INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD