Date: Fri, 2 Dec 2011 15:31:58 -0500
Reply-To: Gene Maguin <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Gene Maguin <email@example.com>
Subject: Re: Advice for Simplifying Two-line Syntax?
Yes, there may be a simpler way to do this using either the Table subcommand
of the Match files command or the Update command. But there may not be
enough gain to make it worthwhile. The problem is already having or being to
make up file 2 very easily.
To use either you need to have two files. File 1 would look like
Riverside McAfee 2012
File 2 would look like
Location OldProductTitle NewProductTitle
Riverside McAfee 2012 McAfee Total Protection 2012-3 Users
1) Assume that NewProductTitle and ProductNo are not in File 1.
Match files file=file 1/table=file 2/by location oldproducttitle.
2) Assume that NewProductTitle and ProductNo are already in File 1.
Update file=file 1/file=file 2/by location oldproducttitle.
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Friday, December 02, 2011 4:43 PM
Subject: Advice for Simplifying Two-line Syntax?
I'm correcting product names and plugging-in product numbers in a data set
by using the IF statement and two conditions based on "Location" and
"OldProductTitle". (Location is used to verify the product title as
variations occur throughout the data set because the info has been entered
inconsistently.) The two-line syntax works (shown below) but is there a way
to condense the two or achieve the same effect in more efficient manner as
the corrections number over 400 (which means 800 syntax lines)? I'd also
like to maintain working with strings as this situation is likely to
reoccur. Many thanks for your advice. ~elle
IF Location='Riverside' AND OldProductTitle='McAfee 2012'
NewProductTitle='McAfee Total Protection 2012-3 Users'.
IF Location='Riverside' AND NewProductTitle='McAfee Total Protection 2012-3