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.

QUALIFIER Subcommand<br />

GET DATA 629<br />

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

It specifies the character used to enclose values that contain delimiter characters. For<br />

example, if a comma is the delimiter, values that contain commas will be read incorrectly<br />

unless there is a text qualifier enclosing the value, preventing the commas in the value from<br />

being interpreted as delimiters between values. CSV-format data files exported from Excel<br />

use a double quote (")as a text qualifier.<br />

• The text qualifier appears at both the beginning and end of the value, enclosing the entire<br />

value.<br />

• The qualifier value must be enclosed in single or double quotes. If the qualifier is a single<br />

quote, the value should be enclosed in double quotes. If the qualifier value is a double<br />

quote, the value should be enclosed in single quotes.<br />

Example<br />

/QUALIFIER = ‘”’<br />

VARIABLES Subcommand for ARRANGEMENT = DELIMITED<br />

For delimited files, the VARIABLES subcommand specifies the variable names and variable<br />

formats.<br />

• Variable names must conform to SPSS variable naming rules (see “Variables” on p. 21).<br />

• Each variable name must be followed by a format specification (see “Variable Format<br />

Specifications for TYPE = TXT” below).<br />

VARIABLES Subcommand for ARRANGEMENT = FIXED<br />

For fixed-format files, the VARIABLES subcommand specifies variable names, start and end<br />

column locations, and variable formats.<br />

• Variable names must conform to SPSS variable naming rules (see “Variables” on p. 21).<br />

• Each variable name must be followed by column specifications. Start and end columns<br />

must be separated by a dash, as in: 0-10.<br />

• Each column specification must be followed by a format specification.<br />

• Column numbering starts with 0, not 1 (in contrast to DATA LIST).<br />

Multiple records. If each case spans more than one record (as specified with the FIXCASE<br />

subcommand), delimit variable specifications for each record with a slash (/) followed by the<br />

record number, as in:<br />

VARIABLES = /1 var1 0-10 F var2 11-20 DATE<br />

/2 var3 0-5 A var4 6-10 F<br />

/3 var5 0-20 A var6 21-30 DOLLAR

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

Saved successfully!

Ooh no, something went wrong!