27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UPDATE<br />

UPDATE FILE={master file}<br />

{* }<br />

[/RENAME=(old varnames=new varnames)...]<br />

[/IN=varname]<br />

/FILE={transaction file1}<br />

{* }<br />

[/FILE=transaction file2]<br />

/BY key variables<br />

[/MAP]<br />

[/KEEP={ALL** }] [/DROP=varlist]<br />

{varlist}<br />

**Default if the subcommand is omitted.<br />

Example<br />

UPDATE FILE=MAILIST /FILE=NEWLIST /BY=ID.<br />

Overview<br />

Options<br />

UPDATE replaces values in a master file with updated values recorded in one or more files<br />

called transaction files. Cases in the master file and transaction file are matched according<br />

to a key variable.<br />

The master file and the transaction files must be SPSS-format data files created with the<br />

SAVE or XSAVE commands or the working data file. UPDATE replaces values and creates a<br />

new working data file, which replaces the original working file. Use the SAVE or XSAVE<br />

commands to save the updated file on disk as an SPSS-format data file.<br />

UPDATE is designed to update values of existing variables for existing cases. Use MATCH<br />

FILES to add new variables to an SPSS-format data file and ADD FILES to add new cases.<br />

Variable Selection. You can specify which variables from each input file are included in the<br />

new working file using the DROP and KEEP subcommands.<br />

Variable Names. You can rename variables in each input file before combining the files<br />

using the RENAME subcommand. This permits you to combine variables that are the same<br />

but whose names differ in different input files, or to separate variables that are different but<br />

have the same name.<br />

1622

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!