UPDATE

UPDATE replaces values in a master file with updated values recorded in one or more files called transaction files. Cases in the master file and transaction file are matched according to a key variable.

UPDATE FILE={master file} [PASSWORD='password']
            {*          }
 
 [/RENAME=(old varnames=new varnames)...]
 
 [/IN=varname]
 
  /FILE={transaction file1} [PASSWORD='password']
        {*                }
 
 [/FILE=transaction file2 [PASSWORD='password'] ]
 
  /BY key variables
 
 [/MAP]
 
 [/KEEP={ALL**  }] [/DROP=varlist]  
        {varlist}

**Default if the subcommand is omitted.

Release History

Release 22.0

  • PASSWORD keyword introduced on the FILE subcommand.

Example

UPDATE FILE='/data/maillist.sav' 
  /FILE='/data/newlist.sav' 
  /BY=ID.