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.

PRESERVE<br />

PRESERVE<br />

Overview<br />

PRESERVE stores current SET specifications that can later be restored by the RESTORE<br />

command. PRESERVE and RESTORE are especially useful with the macro facility.<br />

PRESERVE—RESTORE sequences can be nested up to five levels.<br />

Basic Specification<br />

Example<br />

The only specification is the command keyword. PRESERVE has no additional specifications.<br />

GET FILE=PRSNNL.<br />

FREQUENCIES VAR=DIVISION /STATISTICS=ALL.<br />

PRESERVE.<br />

SET XSORT=NO WIDTH=90 UNDEFINED=NOWARN BLANKS=000 CASE=UPLOW.<br />

SORT CASES BY DIVISION.<br />

REPORT FORMAT=AUTO LIST /VARS=LNAME FNAME DEPT SOCSEC SALARY<br />

/BREAK=DIVISION /SUMMARY=MEAN.<br />

RESTORE.<br />

• GET reads SPSS-format data file PRSNNL.<br />

• FREQUENCIES requests a Frequency table and all statistics for variable DIVISION.<br />

• PRESERVE stores all current SET specifications.<br />

• SET changes several subcommand settings.<br />

• SORT sorts cases in preparation for a report. Because SET XSORT=NO, the sort program<br />

is not used to sort cases; another sort program must be available.<br />

• REPORT requests a report organized by variable DIVISION.<br />

• RESTORE reestablishes the SET specifications that were in effect when PRESERVE was<br />

specified.<br />

1238

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

Saved successfully!

Ooh no, something went wrong!