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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1672 WRITE<br />

Basic Specification<br />

The basic specification is a slash followed by a variable list. The values for all of the variables<br />

specified on the list are included with the rest of the output from your session.<br />

<strong>Syntax</strong> Rules<br />

• A slash must precede the variable specifications. The first slash begins the definition of<br />

the first (and possibly only) line per case of the WRITE output.<br />

• Specified variables must already exist, but they can be numeric, string, scratch, temporary,<br />

or system variables. Subscripted variable names, such as X(1) for the first element in<br />

vector X, cannot be used.<br />

• Keyword ALL can be used to write the values of all user-defined variables in the working<br />

data file.<br />

Operations<br />

• WRITE is executed once for each case constructed from the data file.<br />

• Values are written to the file as the data are read.<br />

• WRITE is a transformation and will not be executed unless it is followed by a procedure<br />

or the EXECUTE command.<br />

• Lines longer than 132 columns can be written. However, if the record width of the lines<br />

to be written exceeds the default output width or the width specified with SET WIDTH, the<br />

program issues an error message and terminates processing.<br />

• There are no carriage control characters in the output file generated by WRITE.<br />

• User-missing values are written just like valid values. System-missing values are represented<br />

by blanks.<br />

• If you are writing a file to be used on another system, you should take into account that<br />

some data types cannot be read all computers.<br />

• If long records are less convenient than short records with multiple records per case, you<br />

can write out a case identifier and insert a string as a record identification number. The<br />

receiving system can then check for missing record numbers (see “Strings” on p. 1674 for<br />

an example).

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

Saved successfully!

Ooh no, something went wrong!