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.

8 Universals<br />

• To specify quotation marks within a string, use apostrophes to enclose the string:<br />

’Categories Labeled "UNSTANDARD" in the Report’<br />

• String specifications can be broken across command lines by specifying each string<br />

segment within apostrophes or quotation marks and using a + sign to join segments. For<br />

example,<br />

’One, Two’<br />

can be specified as<br />

’One,’<br />

+ ’ Two’<br />

The plus sign can be specified on either the first or the second line of the broken string.<br />

Any blanks separating the two segments must be enclosed within one or the other string<br />

segment.<br />

• Blanks within apostrophes or quotation marks are significant.<br />

Delimiters<br />

Delimiters are used to separate data values, keywords, arguments, and specifications.<br />

• A blank is usually used to separate one specification from another, except when another<br />

delimiter serves the same purpose or when a comma is required.<br />

• Commas are required to separate arguments to functions. Otherwise, blanks are generally<br />

valid substitutes for commas.<br />

• Arithmetic operators (+, –, *, and /) serve as delimiters in expressions.<br />

• Blanks can be used before and after operators or equals signs to improve readability, but<br />

commas cannot.<br />

• Special delimiters include parentheses, apostrophes, quotation marks, the slash, and the<br />

equals sign. Blanks before and after special delimiters are optional.<br />

• The slash is used primarily to separate subcommands and lists of variables. Although<br />

slashes are sometimes optional, it is best to enter them as shown in the syntax diagrams.<br />

• The equals sign is used between a subcommand and its specifications, as in STATISTICS=<br />

MEAN, and to show equivalence, as in COMPUTE target variable=expression. Equals signs<br />

following subcommands are frequently optional, but it is best to enter them for clarity.<br />

<strong>Command</strong> Order<br />

<strong>Command</strong> order is more often than not a matter of common sense and follows this logical<br />

sequence: variable definition, data transformation, and statistical analysis. For example, you<br />

cannot label, transform, analyze, or use a variable in any way before it exists. The following<br />

general rules apply:<br />

• <strong>Command</strong>s that define variables for a session (DATA LIST, GET, MATRIX DATA, etc.) must<br />

precede commands that assign labels or missing values to those variables; they must also<br />

precede transformation and procedure commands that use those variables.

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

Saved successfully!

Ooh no, something went wrong!