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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REFORMAT<br />

REFORMAT {ALPHA } = varlist [/...]<br />

{NUMERIC}<br />

Example<br />

REFORMAT ALPHA=STATE /NUMERIC=HOUR1 TO HOUR6.<br />

Overview<br />

REFORMAT converts variables from BMDP files to variables for SPSS-format data files. It<br />

also converts very old versions of SPSS-format data files to current SPSS-format data files.<br />

REFORMAT can change the print formats, write formats, and missing-value specifications for<br />

variables from alphanumeric to numeric, or from numeric to alphanumeric.<br />

Basic Specification<br />

The basic specification is ALPHA and a list of variables or NUMERIC and a list of variables.<br />

• The ALPHA subcommand declares variables as string variables. The NUMERIC subcommand<br />

declares variables as numeric variables.<br />

• If both ALPHA and NUMERIC are specified, they must be separated by a slash.<br />

Operations<br />

• REFORMAT always assigns the print and write format F8.2 (or the format specified on<br />

the SET command) to variables specified after NUMERIC and format A4 to variables<br />

specified after ALPHA.<br />

• Formats cannot be specified on REFORMAT. To define different formats for numeric<br />

variables, use the PRINT FORMATS, WRITE FORMATS, or FORMATS commands. To<br />

declare new format widths for string variables, use the STRING and COMPUTE<br />

commands to perform data transformations.<br />

• Missing-value specifications for variables named with both ALPHA and NUMERIC are<br />

also changed to conform to the new formats.<br />

• The SAVE or XSAVE commands can be used to save the reformatted variables in an<br />

SPSS-format data file. This avoids having to reformat the variables each time the SPSSformat<br />

or BMDP data set is used.<br />

1349

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

Saved successfully!

Ooh no, something went wrong!