combine vars w/ same name in different files

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

combine vars w/ same name in different files

Mark Palmberg
I do a lot of merge files processes (via the wizard), but I'm stuck now (or
blinded by my ignorance).  I have a main file with two variables:  ID and
CAPACITY.  The capacity variable was merged to my main file some months ago
from an external vendor's file.  **Not all records in my main file now
contain a value for CAPACITY.**

I now have another, updated, file with variables "ID" and "CAPACITY."  I can
merge the files on key field ID, but then I'd have two CAPACITY variables in
the main file (or CAPACITY and CAPACITY1), when what I really want to do is
add the CAPACITY variable *values* from the new, updated, file to the
records on the main file that do not yet have a value for this variable.
The "Copy Data Properties" doesn't appear to be what I'm after, and I don't
see anything under the CSR that might help.  Perhaps I could use the RENAME
subcommand under MATCH FILES and just create a new variable to hold merged
data from the two identical CAPACITY variables in the input files?

Apologizing in advance for not providing enough clarification,

Mark

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: combine vars w/ same name in different files

Melissa Ives
Make sure that CAPACITY is the same format in both files, and look at the UPDATE command.

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Palmberg
Sent: Friday, April 11, 2008 3:51 PM
To: [hidden email]
Subject: [SPSSX-L] combine vars w/ same name in different files

I do a lot of merge files processes (via the wizard), but I'm stuck now (or blinded by my ignorance).  I have a main file with two variables:  ID and CAPACITY.  The capacity variable was merged to my main file some months ago from an external vendor's file.  **Not all records in my main file now contain a value for CAPACITY.**

I now have another, updated, file with variables "ID" and "CAPACITY."  I can merge the files on key field ID, but then I'd have two CAPACITY variables in the main file (or CAPACITY and CAPACITY1), when what I really want to do is add the CAPACITY variable *values* from the new, updated, file to the records on the main file that do not yet have a value for this variable.
The "Copy Data Properties" doesn't appear to be what I'm after, and I don't see anything under the CSR that might help.  Perhaps I could use the RENAME subcommand under MATCH FILES and just create a new variable to hold merged data from the two identical CAPACITY variables in the input files?

Apologizing in advance for not providing enough clarification,

Mark

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (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

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.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: combine vars w/ same name in different files

Mark Palmberg
And I only used the word "updated" what, three times in my plea for
assistance?  Sheesh.  Thank you, Melissa.

Mark

On Fri, Apr 11, 2008 at 3:53 PM, Melissa Ives <[hidden email]> wrote:

> Make sure that CAPACITY is the same format in both files, and look at the
> UPDATE command.
>
> Melissa
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Mark Palmberg
> Sent: Friday, April 11, 2008 3:51 PM
> To: [hidden email]
> Subject: [SPSSX-L] combine vars w/ same name in different files
>
> I do a lot of merge files processes (via the wizard), but I'm stuck now
> (or blinded by my ignorance).  I have a main file with two variables:  ID
> and CAPACITY.  The capacity variable was merged to my main file some months
> ago from an external vendor's file.  **Not all records in my main file now
> contain a value for CAPACITY.**
>
> I now have another, updated, file with variables "ID" and "CAPACITY."  I
> can merge the files on key field ID, but then I'd have two CAPACITY
> variables in the main file (or CAPACITY and CAPACITY1), when what I really
> want to do is add the CAPACITY variable *values* from the new, updated, file
> to the records on the main file that do not yet have a value for this
> variable.
> The "Copy Data Properties" doesn't appear to be what I'm after, and I
> don't see anything under the CSR that might help.  Perhaps I could use the
> RENAME subcommand under MATCH FILES and just create a new variable to hold
> merged data from the two identical CAPACITY variables in the input files?
>
> Apologizing in advance for not providing enough clarification,
>
> Mark
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (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
>
> 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.
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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