LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Dec 2011 15:31:58 -0500
Reply-To:     Gene Maguin <emaguin@buffalo.edu>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Gene Maguin <emaguin@buffalo.edu>
Subject:      Re: Advice for Simplifying Two-line Syntax?
In-Reply-To:  <000301ccb13b$51f48d30$f5dda790$@gmail.com>
Content-Type: multipart/alternative;

Elle,

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

Location OldProductTitle

Riverside McAfee 2012

Etc.

File 2 would look like

Location OldProductTitle NewProductTitle ProductNo

Riverside McAfee 2012 McAfee Total Protection 2012-3 Users B005AAWYR2

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.

Gene Maguin

From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of elle Sent: Friday, December 02, 2011 4:43 PM To: SPSSX-L@LISTSERV.UGA.EDU 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

SYNTAX EXAMPLE

IF Location='Riverside' AND OldProductTitle='McAfee 2012' NewProductTitle='McAfee Total Protection 2012-3 Users'.

IF Location='Riverside' AND NewProductTitle='McAfee Total Protection 2012-3 Users' ProductNo='B005AAWYR2'.


[text/html]


Back to: Top of message | Previous page | Main SPSSX-L page