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.

1716 Appendix C<br />

The loop terminates when the program encounters an empty segment, which means<br />

that there are no more repeating data groups on a record.<br />

• In each iteration of the loop in which an #ALL segment is not empty, DATA LIST reads<br />

STUDENT and SCORE in a classroom record. The program begins reading these<br />

variables in the first record, in the starting column specified by REREAD COLUMN.<br />

For example, in the first iteration, the program reads STUDENT and SCORE beginning<br />

in column 6. In the second iteration, the program reads STUDENT and SCORE<br />

starting in column 14 of the same record. When all repeating groups have been read<br />

for a record, loop processing begins on the following record.<br />

• END CASE creates a new case for each repeating group.<br />

• REREAD causes DATA LIST to read repeating data groups in the same record in which<br />

it last read CLASS. Without REREAD, each execution of DATA LIST would begin on<br />

a different record.<br />

• LEAVE preserves the value of CLASS across the repeating data groups on a record.<br />

Thus, the same class number is read for each student on a classroom record.<br />

• INPUT PROGRAM signals the beginning of data definition.<br />

• BEGIN DATA and END DATA indicate that the data are inline. The data are identical<br />

to those in the previous example except that they do not contain a variable indicating<br />

the number of repeating groups per record.<br />

• These commands generate the same output as shown in Figure C.11.

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

Saved successfully!

Ooh no, something went wrong!