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.

Determining <strong>Command</strong> Order<br />

<strong>Command</strong>s and Program States 1689<br />

Table A.1 shows where specific commands can be placed in the command file in terms<br />

of program states and what happens when the program encounters a command in each of<br />

the four program states. If a column contains a dash, the command is accepted in that<br />

program state and it leaves the program in that state. If one of the words INIT, INPUT,<br />

TRANS, or PROC appears in the column, the command is accepted in the program state<br />

indicated by the column heading, but it moves the program into the state indicated by<br />

INIT, INPUT, TRANS, or PROC. Asterisks in a column indicate errors when the program<br />

encounters the command in that program state. <strong>Command</strong>s marked with the dagger (†)<br />

in the column for the procedure state clear the working data file.<br />

The table shows six groups of commands: utility, file definition, input program, data<br />

transformation, restricted transformation, and procedure commands. These groups are<br />

discussed in the following sections.<br />

To read the table, first locate the command. If you simply want to know where in the<br />

command stream it can go, look for columns without asterisks. For example, the<br />

COMPUTE command can be used when the program is in the input program state, the<br />

transformation state, or the procedure state, but it will cause an error if you try to use it<br />

in the initial state. If you want to know what can follow a command, look at each of the<br />

four columns next to the command. If the column is dashed, any commands not showing<br />

asterisks in the column for that program state can follow the command. If the column<br />

contains one of the words INIT, INPUT, TRANS, or PROC, any command not showing<br />

asterisks in the column for the program state indicated by that word can follow the<br />

command.<br />

For example, if you want to know what commands can follow the INPUT PROGRAM<br />

command, note first that it is allowed only in the initial or procedure states. Then note<br />

that INPUT PROGRAM puts the program into the input program state wherever it occurs<br />

legally. This means that commands with dashes or words in the INPUT column can<br />

follow the INPUT PROGRAM command. This includes all the utility commands, the<br />

DATA LIST command, input program commands, and transformation commands like<br />

COMPUTE. <strong>Command</strong>s that are not allowed after the INPUT PROGRAM command are<br />

most of the file definition commands that are their own input program (such as GET),<br />

restricted transformations (such as SELECT IF), and procedures.

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

Saved successfully!

Ooh no, something went wrong!