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.

1222 POINT<br />

Example<br />

• DATA LIST reads the variables AGE, SEX, and TICKETS from the file DRIVERS.<br />

• The second DO IF—END IF structure executes an END FILE command as soon as a record<br />

is read that contains a driver’s age greater than 30. The program does not add this last case<br />

to the working file when it ends the file (see END FILE).<br />

FILE HANDLE DRIVERS/ file specifications.<br />

POINT FILE=DRIVERS /KEY=#FRSTAGE.<br />

• FILE HANDLE defines the handle for the data file to be read by POINT. The handle is specified<br />

on the FILE subcommand on POINT.<br />

• KEY on POINT specifies the key variable. The key variable must be a string, and it must<br />

already exist as the result of a prior DATA LIST, KEYED DATA LIST, or transformation<br />

command.<br />

FILE Subcommand<br />

FILE specifies a file handle for the keyed data file.The file handle must have been previously<br />

defined on a FILE HANDLE command.<br />

• FILE is optional.<br />

• If FILE is omitted, POINT reads from the last file specified on an input command, such as<br />

DATA LIST.<br />

Example<br />

FILE HANDLE DRIVERS/ file specifications.<br />

POINT FILE=DRIVERS /KEY=#NXTCASE.<br />

• FILE HANDLE specifies DRIVERS as the file handle for the data. The FILE subcommand<br />

on POINT specifies file handle DRIVERS.<br />

KEY Subcommand<br />

KEY specifies the variable whose value will be used as the file key for determining where<br />

sequential retrieval by DATA LIST will begin or resume. This variable must be a string variable,<br />

and it must already exist as the result of a prior DATA LIST, KEYED DATA LIST, or transformation<br />

command.<br />

• KEY is required. Its only specification is a single variable. The variable can be a permanent<br />

variable or a scratch variable.<br />

• Where the keys on a file are inherently numbers, such as social security numbers, the<br />

STRING function can be used to convert the numeric variable to a string (see “Conversion<br />

Functions” on p. 48 in Volume I).

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

Saved successfully!

Ooh no, something went wrong!