Skip to content

UPDATE

Applies transaction files to a master file by key: non-missing transaction values replace master values, and new keys become new cases.

UPDATE FILE={*|dataset|'path'} [/RENAME=(old=new)] [/IN=var]
/FILE=… [/RENAME] [/IN] … /BY keys [/KEEP=varlist] [/DROP=varlist].
Kind Data management
Body main /SUBCOMMAND[=] …
Changes data yes, undoable
Subcommands /BY, /DROP, /FILE, /IN, /KEEP, /MAP, /RENAME
  • FILE: the first is the master, the rest are transactions applied in order
  • BY: key variables (inputs need no pre-sorting)
  • IN: flag variable: 1 when the file supplied the case
  • RENAME: rename variables of the preceding file
  • KEEP / DROP: variables of the result
UPDATE FILE=* /FILE=corrections /BY id.
UPDATE FILE='master.sav' /FILE='fixes.sav' /IN=fixed /BY id.
  • System-missing values and blank strings in a transaction do not overwrite; user-missing values do.
  • If the master has duplicate keys, only the first case of each key is updated (reported).

MATCH FILES, ADD FILES


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.