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.

168 BEGIN DATA—END DATA<br />

Operations<br />

Example<br />

• When the program encounters BEGIN DATA, it begins to read and process data on the next<br />

input line. All preceding transformation commands are processed as the working file is<br />

built.<br />

• The program continues to evaluate input lines as data until it encounters END DATA, at<br />

which point it begins evaluating input lines as commands.<br />

• No other commands are recognized between BEGIN DATA and END DATA.<br />

• The INCLUDE command can specify a file that contains BEGIN DATA, data lines, and END<br />

DATA. The data in such a file are treated as inline data. Thus, the FILE subcommand should<br />

be omitted from the DATA LIST (or similar) command.<br />

• When running the program from prompts, the prompt DATA> appears immediately after<br />

BEGIN DATA is specified. After END DATA is specified, the command line prompt returns.<br />

DATA LIST /XVAR 1 YVAR ZVAR 3-12 CVAR 14-22(A) JVAR 24.<br />

BEGIN DATA<br />

1 3424 274 ABU DHABI 2<br />

2 39932 86 AMSTERDAM 4<br />

3 8889 232 ATHENS<br />

4 3424 294 BOGOTA 3<br />

5 11323 332 HONG KONG 3<br />

6 323 232 MANILA 1<br />

7 3234 899 CHICAGO 4<br />

8 78998 2344 VIENNA 3<br />

9 8870 983 ZURICH 5<br />

END DATA.<br />

MEANS XVAR BY JVAR.<br />

• DATA LIST defines the names and column locations of the variables. The FILE subcommand<br />

is omitted because the data are inline.<br />

• There are nine cases in the inline data. Each line of data completes a case.<br />

• END DATA signals the end of data lines. It begins in column 1 and has only a single space<br />

between END and DATA.

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

Saved successfully!

Ooh no, something went wrong!