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.

1394 REPEATING DATA<br />

STARTS Subcommand<br />

STARTS indicates the beginning location of the repeating data segment on the first record of<br />

each input case. STARTS is required and can specify either a number or a variable name.<br />

• If the repeating groups on the first record of each input case begin in the same column,<br />

STARTS specifies a column number.<br />

• If the repeating groups on the first record of each input case do not begin in the same<br />

column, STARTS specifies the name of a variable whose value for each input case indicates<br />

the beginning location of the repeating groups on the first record. The variable can be<br />

defined on DATA LIST or created by transformation commands that precede REPEATING<br />

DATA.<br />

• When repeating groups are continued on multiple records for each input case, STARTS<br />

must also specify an ending location if there is room on the logical record length for more<br />

repeating groups than are contained on the first record of each input case. The ending<br />

column applies only to the first record of each input case. See the CONTINUED subcommand<br />

on p. 1398 for an example.<br />

• The ending column can be specified as a number or a variable name. Specifications for<br />

the beginning column and the ending column are separated by a hyphen. The values of<br />

the variable used to define the ending column must be valid values and must be larger<br />

than the starting value.<br />

• If the variable specified for the ending column is undefined or missing for an input case,<br />

the program displays a warning message and builds no output cases from that input case.<br />

If the variable specified for the ending column on STARTS has a value that is less than the<br />

value specified for the starting column, the program issues a warning and builds output<br />

cases only from the continuation records of that input case; it does not build cases from<br />

the first record of the case.<br />

• If the ending location is required but not supplied, the program generates output cases<br />

with system-missing values for the variables specified on the DATA subcommand and may<br />

misread all data after the first or second record in the data file (see the CONTINUED<br />

subcommand on p. 1398).<br />

Example<br />

* Repeating groups in the same location.<br />

INPUT PROGRAM.<br />

DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.<br />

REPEATING DATA STARTS=12 /OCCURS=NUMVEH<br />

/DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.<br />

END INPUT PROGRAM.<br />

• STARTS specifies column number 12. The repeating groups must therefore start in<br />

column 12 of the first record of each input case.

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

Saved successfully!

Ooh no, something went wrong!