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.

XSAVE 1683<br />

• RENAME does not affect the working data file. However, if RENAME precedes DROP or<br />

KEEP, variables must be referred to by their new names on DROP or KEEP.<br />

• Old variable names do not need to be specified according to their order in the working<br />

data file.<br />

• Name changes take place in one operation. Therefore, variable names can be exchanged<br />

between two variables.<br />

• Multiple RENAME subcommands are allowed.<br />

Example<br />

XSAVE OUTFILE=EMPL88 /RENAME AGE=AGE88 JOBCAT=JOBCAT88.<br />

CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.<br />

• RENAME specifies two name changes for file EMPL88: AGE is renamed to AGE88 and<br />

JOBCAT is renamed to JOBCAT88.<br />

Example<br />

XSAVE OUTFILE=EMPL88 /RENAME (AGE JOBCAT=AGE88 JOBCAT88).<br />

CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.<br />

• The name changes are identical to those in the previous example: AGE is renamed to<br />

AGE88 and JOBCAT is renamed to JOBCAT88. The parentheses are required with this<br />

method.<br />

MAP Subcommand<br />

MAP displays a list of the variables in the SPSS-format data file and their corresponding<br />

names in the working data file.<br />

• The only specification is keyword MAP. There are no additional specifications.<br />

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of<br />

subcommands that precede it, but not results of subcommands that follow it.<br />

Example<br />

GET FILE=HUBEMPL.<br />

XSAVE OUTFILE=EMPL88 /RENAME=(AGE=AGE88) (JOBCAT=JOBCAT88)<br />

/KEEP=LNAME NAME JOBCAT88 ALL /MAP.<br />

MEANS RAISE88 BY DEPT88.<br />

• MAP is used to confirm the new names for AGE and JOBCAT and the order of variables in<br />

the EMPL88 file (LNAME, NAME, and JOBCAT88, followed by all remaining variables from<br />

the working data file).<br />

COMPRESSED and UNCOMPRESSED Subcommands<br />

COMPRESSED saves the file in compressed form. UNCOMPRESSED saves the file in uncompressed<br />

form. In a compressed file, small integers (from −99 to 155) are stored in one byte<br />

instead of the eight bytes used in an uncompressed file.

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

Saved successfully!

Ooh no, something went wrong!