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.

1128 OMS<br />

Figure 8 Tables with different numbers of row elements<br />

In general, the less specific the subtype selection in the OMS command, the less likely you<br />

are to get sensible data files -- or any data files at all. For example:<br />

OMS /SELECT TABLES /DESTINATION FORMAT=SAV OUTFILE=’mydata.sav’.<br />

will probably fail to create a data file more often than not, since it will select all tables, including<br />

Notes tables, which have a table structure that is incompatible with most other table<br />

types.<br />

Controlling Column Elements to Control Variables in the Data File<br />

You can use the COLUMNS subcommand to specify which dimension elements should be in<br />

the columns and therefore are used to create variables in the generated data file. This is<br />

equivalent to pivoting the table in the Viewer.<br />

Example<br />

The DESCRIPTIVES command produces a table of descriptive statistics with variables in the<br />

rows and statistics in the columns. A data file created from that table would therefore use the<br />

statistics as variables and the original variables as cases. If you want the original variables to<br />

be variables in the generated data file and the statistics to be cases:<br />

OMS<br />

/SELECT TABLES<br />

/IF COMMANDS=['Descriptives'] SUBTYPES=['Descriptive Statistics']<br />

/DESTINATION FORMAT=SAV OUTFILE='c:\temp\temp.sav'<br />

/COLUMNS DIMNAMES=['Variables'].<br />

DESCRIPTIVES VARIABLES=salary salbegin.<br />

OMSEND.

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

Saved successfully!

Ooh no, something went wrong!