Login  Register

Re: Problem with update command syntax

Posted by Baker, Harley on Jun 13, 2021; 8:59pm
URL: http://spssx-discussion.165.s1.nabble.com/Problem-with-update-command-syntax-tp5740584p5740586.html

Thanks, Gene

 

I changed the match to update and the table to file in the syntax and it worked perfectly. Don’t know what I was thinking when I used match instead of update even when I was describing it as update. Too long looking at it, too long without coffee, etc.

 

I knew all it would take was a pair of fresh eyes.

 

Harley

 

Dr. Harley Baker

Professor Emeritus of Psychology

California State University Channel Islands

 

[hidden email]

 

 

From: "SPSSX(r) Discussion" <[hidden email]> on behalf of "Maguin, Eugene" <[hidden email]>
Reply-To: "Maguin, Eugene" <[hidden email]>
Date: Sunday, June 13, 2021 at 1:47 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Problem with update command syntax

 

CAUTION: This email originated from outside of CSUCI. Do not click links or open attachments unless you validate the sender and know the content is safe. Contact ITS if you have any concerns

 

Harley,

Would you try the command with update rather than match files. The update documentation shows this statement

 

UPDATE is designed to update values of existing variables for existing cases. Use MATCH FILES to add

new variables to a data file and ADD FILES to add new cases.

 

And that sounds like what you are doing because the variables to be updated already exist in the master file.

 

Gene Maguin

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Baker, Harley
Sent: Sunday, June 13, 2021 4:25 PM
To: [hidden email]
Subject: Problem with update command syntax

 

Greetings!

 

I am having difficulty with the Update command syntax and am hoping someone can show me the error of my ways. I am trying to update a file with values from a separate file. Below is the syntax:

 

match files

     file  = '/Users/Professional/Desktop/Final.05.21.2021/Processed Data Files'

+            '/06.13.2021_master.sav'

    /table = '/Users/Professional/Desktop/Final.05.21.2021/Processed Data Files'

+            '/06.13.2021_all imputed table.sav'

    /by      imputation_ id

    /map.

 

execute.

 

The map output indicates the command was “successful” – showing which file contributed the final values in the resultant matched file. Yet, when I do a file compare and run descriptives on the resultant file, it only has the values from the master file, none of which were updated or replaced by the data in the table. I have checked both of these files and there are no problems with them individually. The syntax looks correct, and SPSS tells me it was successful, yet it doesn’t work. Just in case there is some funky syntax error, I have also done this from the pull-down menus with the same result. I am temporarily stumped and cannot go any further on this project withour resolving this issue.

 

I am running v27 on an iMac using Big Sur 11.4. Any insight and help would be appreciated. I am happy to send the syntax and output files to interested parties. Thank you very much!

 

Harley

 

Dr. Harley Baker

Professor Emeritus of Psychology

California State University Channel Islands

 

[hidden email]

 

 

 

 

 

 

 

 

 

 

===================== 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

===================== 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

===================== 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