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.

DATA LIST 427<br />

• For freefield data, variables are located according to the sequence in which they are<br />

named on DATA LIST. The order of variables on DATA LIST must correspond to the order<br />

of variables in the data.<br />

• To include decimal positions in the format for fixed-format data, specify the total width<br />

followed by a decimal point and the number of decimal positions. For example, (DOLLAR5)<br />

specifies a five-column DOLLAR format without decimal positions; (DOLLAR5.2) specifies<br />

a five-column DOLLAR format, two columns of which are decimal positions.<br />

Numeric Formats<br />

• Format specifications on DATA LIST are input formats. Based on the width specification<br />

and format type, the program generates output (print and write) formats for each variable.<br />

The program automatically expands the output format to accommodate punctuation characters<br />

such as decimal points, commas, dollar signs, or date and time delimiters. (The<br />

program does not automatically expand the output formats you assign on the FORMATS,<br />

PRINT FORMATS, and WRITE FORMATS commands. For information on assigning output<br />

formats, refer to these commands.)<br />

• Scientific notation is accepted in input data with F, COMMA, DOLLAR, DOT, and PCT<br />

formats. The same rules apply to these formats as to E format. The values 1.234E3,<br />

1.234+3, and 1.234E 3 are all legitimate. The last value (with a blank space) will<br />

cause freefield data to be misread and therefore should be avoided when LIST or FREE<br />

is specified.<br />

Implied Decimal Positions<br />

• For fixed-format data, decimal positions can be coded in the data or implied by the<br />

format. If decimal positions are implied but are not entered in the data, the program interprets<br />

the rightmost digits in each value as the decimal digits. A coded decimal point in a<br />

value overrides the number of implied decimal places. For example, (DOLLAR,2) specifies<br />

two decimal positions. The value 123 is interpreted as 1.23; however, the value 12.3 is<br />

interpreted as 12.3 because the coded decimal position overrides the number of implied<br />

decimal positions.<br />

• For freefield data, decimal positions cannot be implied but must be coded in the data. If<br />

decimal positions are specified in the format but a data value does not include a decimal<br />

point, the program fills the decimal places with zeros. For example, with F3.1 format<br />

(three columns with one decimal place), the value 22 is displayed as 22.0. If a value in the<br />

data has more decimal digits than are specified in the format, the additional decimals are<br />

truncated in displayed output (but not in calculations). For example, with F3.1 format, the<br />

value 2.22 is displayed as 2.2 even though in calculations it remains 2.22.<br />

Table 1 compares how values are interpreted for fixed and freefield formats. Values in the<br />

table are for a four-column numeric variable.

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

Saved successfully!

Ooh no, something went wrong!