Skip to content

SAVE

Saves the active dataset as an SPSS-format .sav or .zsav file with all labels and missing values.

SAVE OUTFILE='file.sav' [/KEEP=varlist] [/DROP=varlist] [/COMPRESSED|/UNCOMPRESSED|/ZCOMPRESSED] [/PASSWORD='password' [/ENCRYPTEDPW=NO|YES]].
Kind Data management
Body main /SUBCOMMAND[=] …
Changes data no
Subcommands /COMPRESSED, /DROP, /ENCRYPTEDPW, /KEEP, /OUTFILE, /PASSWORD, /UNCOMPRESSED, /ZCOMPRESSED
  • PASSWORD: encrypts the file in SPSS’s password-protected format (SPSS 21+ opens it); at most 10 characters
  • ENCRYPTEDPW: YES when the PASSWORD value is an SPSS encoded password; NO (default) for a plain one
SAVE OUTFILE='clean.zsav' /DROP=temp1 temp2.
SAVE OUTFILE='share.sav' /PASSWORD='Rk8#vQ2!mZ'.
  • Pending transformations run first. The file is written to a temporary name and renamed, so an interrupted save never damages the original.
  • With /PASSWORD the file is built and encrypted in memory (AES-256 in SPSS’s ECB-based format) and no unencrypted copy is written. SPSS’s format is weak against password guessing: use a random 10-character password, and prefer a password-protected project for sensitive data. The password is masked in the journal.

GET, EXPORT DATA, OUTPUT SAVE


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