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 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?
Comments: To: elle <elle.lists@gmail.com>
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"> &nbsp;I would be very unsure of using the approach of 800 lines of syntax.<br> First &nbsp; AUTORECODE&nbsp; location and OldProductTitle.&nbsp; Save the template so it can be reapplied.&nbsp; When you reapply the template to new data watch for new string values that were not found the first time around.<br> Second &nbsp; 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 &nbsp; AGGREGATE cases by numeric location and numeric OldProductTitle with the first function for the new string variables.<br> Fourth &nbsp; edit in 2 more columns with newproducttitle and productNo.<br> Fifth &nbsp; print and proofread the new data set.<br> Sixth &nbsp; 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:&quot;Arial&quot;,&quot;sans-serif&quot;">I&#8217;m correcting product names and plugging-in product numbers in a data set by using the IF statement and two conditions based on &#8220;Location&#8221; and &#8220;OldProductTitle&#8221;.&nbsp; (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)?&nbsp; I&#8217;d also like to maintain working with strings as this situation is likely to reoccur. &nbsp;Many thanks for your advice.&nbsp;&nbsp; ~elle<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">SYNTAX EXAMPLE<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">IF Location=&#8217;Riverside&#8217; AND OldProductTitle=&#8217;McAfee 2012&#8217; NewProductTitle=&#8217;McAfee Total Protection 2012&#8212;3 Users&#8217;.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">IF Location=&#8217;Riverside&#8217; AND NewProductTitle=&#8217;McAfee Total Protection 2012&#8212;3 Users&#8217; ProductNo=&#8217;<span style="color:black">B005AAWYR2&#8217;.</span><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</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


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