* Column-style format specifications.
DATA LIST /ID 1-3 SEX 5 (A) AGE 7-8 OPINION1 TO OPINION5 10-14.
BEGIN DATA
001 m 28 12212
002 f 29 21212
003 f 45 32145
...
128 m 17 11194
END DATA.
- The data are inline between the BEGIN DATA and END DATA commands, so the FILE subcommand
is not specified. The data are in fixed format. The keyword FIXED is not specified because it is the
default.
- Variable definition begins after the slash. Variable ID is in columns 1 through 3. Because no format
is specified, numeric format is assumed. Variable ID is therefore a numeric variable that is three digits
wide.
- Variable SEX is
a short string variable in column 5. Variable SEX is one byte wide.
- AGE is a two-column
numeric variable in columns 7 and 8.
- Variables OPINION1, OPINION2, OPINION3, OPINION4, and OPINION5 are named using
the TO keyword. Each is a one-column
numeric variable, with OPINION1 located in column 10 and OPINION5 located in column 14.
- The BEGIN DATA and END DATA commands enclose
the inline data. Note that the values of SEX are lowercase letters and must be specified as such on subsequent
commands.