I tried to duplicate the problem you posted.
UPDATE requires a /BY specification. Do I did ADD FILES instead. Take a look at the syntax below and modify it so that it shows the problem you are mentioning. I was not able to get AUTORECODE to work on the second try because V3arec already existed (see the errors at the bottom of the syntax window). The third try of AUTORECODE worked because it recoded into a new variable. data list list /V3a1 (a10). begin data Mary John JOHN end data. dataset name original. AUTORECODE VARIABLES=V3a1 /INTO V3arec /Save TEMPLATE='c:\project\V3a1.sat' /print. data list list /V3a1 (a10). begin data Ken end data. dataset name addon. sort cases by v3a1. add files file= original /file=addon. dataset name allnames. dataset activate allnames. AUTORECODE VARIABLES=V3a1 /INTO V3arec /apply TEMPLATE='c:\project\V3a1.sat' /print. dataset copy allnames2. dataset activate allnames2. AUTORECODE VARIABLES=V3a1 /INTO V3arec2 /apply TEMPLATE='c:\project\V3a1.sat' /print. Art Kendall Social Research ConsultantsOn 11/19/2012 5:46 AM, Johan Pauwels wrote: Suppose I have a datafile from a study. I do an autorecode for variable V3a1, and save the template. AUTORECODE VARIABLES=V3a1 /INTO V3arec /Save TEMPLATE='....\V3a1.sat' /print. Assume the print subcommand shows this output: 1 John 2 JOHN 3 Mary. Now I update the datafile with one extra case. This case has value "Ken" in V3a1. I apply the coding template from previous autorecode: AUTORECODE VARIABLES=V3a1 /INTO V3arec /APPLY TEMPLATE='....\V3a1.sat' /print. Now print command shows this output: 1 John 2 JOHN 3 Mary. Hm, is seems that "Ken" was not autorecoded!!? However, of I look at the variable V3arec in variable view, I see the extra case has code 4 and labeled "Ken". Is this a bug? Or how do I run the last autorecode command so that the "print" subcommand shows all the codes (including Ken), not just the ones from the template? (I know I can use the display command to see all codes, but I prefer the output from the Autorecode /print subcommmand) -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Autorecode-import-template-and-then-display-new-codes-tp5716302.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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
Art Kendall
Social Research Consultants |
Free forum by Nabble | Edit this page |