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.

1704 Appendix C<br />

Figure C.1 File RECTANG.DAT<br />

1988 CHICAGO JONES 900<br />

1988 CHICAGO GREGORY 400<br />

1988 BATON ROUGE RODRIGUEZ 300<br />

1988 BATON ROUGE SMITH 333<br />

1988 BATON ROUGE GRAU 100<br />

Since the sales data are rectangular, you can use the DATA LIST command to define these<br />

data:<br />

DATA LIST FILE=’RECTANG.DAT’<br />

/ YEAR 1-4<br />

REGION 6-16(A)<br />

SALESPER 18-26(A)<br />

SALES 29-31.<br />

• DATA LIST defines the variable YEAR in columns 1 through 4 and string variable<br />

REGION in columns 6 through 16 in file RECTANG.DAT. The program also reads<br />

variables SALESPER and SALES on each record.<br />

• The LIST output in Figure C.2 shows the contents of each variable.<br />

Figure C.2 LIST output for RECTANG.DAT<br />

YEAR REGION SALESPER SALES<br />

1988 CHICAGO JONES 900<br />

1988 CHICAGO GREGORY 400<br />

1988 BATON ROUGE RODRIGUEZ 300<br />

1988 BATON ROUGE SMITH 333<br />

1988 BATON ROUGE GRAU 100<br />

Nested Files<br />

In a nested file, information on some records applies to several cases. The 1988 sales<br />

data are arranged in nested format in Figure C.3. The data contain three kinds of records.<br />

A code in the first column indicates whether a record is a year (Y), region (R), or person<br />

record (P).

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

Saved successfully!

Ooh no, something went wrong!