= SPSS Write = The '''`WRITE`''' command writes data to an external file. Compare to [[SPSS/Print|PRINT]]. The difference is that `WRITE` will not begin each line with a space character, and will not delimit values with a space character. <> ---- == Usage == {{{ write outfile="path/to/file" / foo bar baz. write outfile="path/to/file encoding="1252" / foo bar baz. write outfile="path/to/file" / 'a string literal' foo 'another string literal' bar. }}} By default, variables are printed according to their [[SPSS/DataFormats#Write_Format|write format]]. An [[SPSS/DataFormats#Input_and_Output_Formats|alternative format]] can be specified following the variable names. {{{ write outfile="path/to/file" / foo 1-10 (F,2) bar 11-20 (A). write outfile="path/to/file" / foo (F10.2) bar (A10). }}} The `WRITE` command can be used to create [[SPSS/ReadingData#Multi-Record_Data|multi-record data]]. {{{ write outfile="path/to/file" /1 foo /2 bar. }}} ---- == Data Model == The `WRITE` command is queued as a pending transformation. ---- == See also == [[https://www.gnu.org/software/pspp/manual/html_node/WRITE.html|PSPP manual for WRITE]] ---- CategoryRicottone