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.

READNAMES Subcommand<br />

GET DATA 627<br />

ON Read the first row of the sheet or specified range as variable names. This is the<br />

default. Values that contain invalid characters or do not meet other criteria for<br />

variable names are converted to valid variable names. For information on variable<br />

naming rules, see “Variable Names” on p. 21.<br />

OFF Read the first row of the sheet or specified range as data. SPSS assigns default<br />

variable names and reads all rows as data.<br />

Example<br />

GET DATA /TYPE=XLS<br />

/FILE=’\\hqdev01\public\sales.xls’<br />

/SHEET=name ’June Sales’<br />

/CELLRANGE=range ’A1:C3’<br />

/READNAMES=on.<br />

Subcommands for TYPE=TXT<br />

The VARIABLES subcommand is required and must be the last GET DATA subcommand.<br />

ARRANGEMENT Subcommand<br />

The ARRANGEMENT subcommand specifies the data format.<br />

DELIMITED Spaces, commas, tabs, or other characters are used to separate variables.<br />

The variables are recorded in the same order for each case but not necessarily<br />

in the same column locations. This is the default.<br />

FIXED Each variable is recorded in the same column location for every case.<br />

FIRSTCASE Subcommand<br />

FIRSTCASE specifies the first line (row) to read for the first case of data. This allows you to<br />

bypass information in the first n lines of the file that either don’t contain data or contain data<br />

you don’t want to read. This subcommand applies to both fixed and delimited file formats.<br />

The only specification for this subcommand is an integer greater than zero that indicates<br />

the number of lines to skip. The default is 1.<br />

DELCASE Subcommand<br />

The DELCASE subcommand applies to delimited data (ARRANGEMENT=DELIMITED) only.<br />

LINE Each case is contained on a single line (row). This is the default.<br />

VARIABLES n Each case contains n variables. Multiple cases can be contained on the same<br />

line, and data for one case can span more than one line. A case is defined by<br />

the number of variables.

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

Saved successfully!

Ooh no, something went wrong!