Date: Fri, 2 Dec 2011 16:02:27 -0500
Reply-To: Art@DrKendall.org
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Art Kendall <Art@DrKendall.org>
Organization: Social Research Consultants
Subject: Re: Advice for Simplifying Two-line Syntax?
In-Reply-To: <000301ccb13b$51f48d30$f5dda790$@gmail.com>
Content-type: text/html; charset=ISO-8859-1
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I would be very unsure of using the approach of 800 lines of syntax.<br>
First AUTORECODE location and OldProductTitle. Save the template
so it can be reapplied. When you reapply the template to new data
watch for new string values that were not found the first time
around.<br>
Second RECODE the numeric variables from the AUTORECODE so that
minor variations of spelling, casing, spacing etc. were collapsed
into the same numeric variable. Copy the dictionary information from
the first set of numeric values to the set produced by RECODE. (this
assumes that you collapse variations into the best variation on the
string)<br>
Third AGGREGATE cases by numeric location and numeric
OldProductTitle with the first function for the new string
variables.<br>
Fourth edit in 2 more columns with newproducttitle and productNo.<br>
Fifth print and proofread the new data set.<br>
Sixth use the new dataset as a table in MATCH CASES.<br>
<br>
Art Kendall<br>
Social Research Consultants<br>
<br>
On 12/2/2011 4:42 PM, elle wrote:
<blockquote cite="mid:000301ccb13b$51f48d30$f5dda790$@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Arial","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">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<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">SYNTAX
EXAMPLE<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">IF
Location=’Riverside’ AND OldProductTitle=’McAfee 2012’
NewProductTitle=’McAfee Total Protection 2012—3 Users’.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">IF
Location=’Riverside’ AND NewProductTitle=’McAfee Total
Protection 2012—3 Users’ ProductNo=’<span
style="color:black">B005AAWYR2’.</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
</div>
</blockquote>
</body>
</html>
=====================
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
|