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.

Appendix A<br />

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

<strong>Command</strong> order is determined only by the system’s need to know and do certain<br />

things in logical sequence. You cannot label a variable before the variable exists in<br />

the file. Similarly, you cannot transform or analyze data before a working data file is<br />

defined. This appendix briefly describes how the program handles various tasks in a<br />

logical sequence. It is not necessary to understand the program states in order to<br />

construct a command file, but some knowledge of how the program works will help<br />

you considerably when you encounter a problem or try to determine why the program<br />

doesn’t seem to want to accept your commands or seems to be carrying out your<br />

instructions incorrectly.<br />

Program States<br />

To run a program session, you need to define your working data file, transform the data,<br />

and then analyze it. This order conforms very closely to the order the program must<br />

follow as it processes your commands. Specifically, the program checks command order<br />

according to the program state through which it passes. The program state is a characteristic<br />

of the program before and after a command is encountered. There are four<br />

program states. Each session starts in the initial state, followed by the input program<br />

state, the transformation state, and the procedure state. The four program states in<br />

turn enable the program to set up the environment, read data, modify data, and execute<br />

a procedure. Figure A.1 shows how the program moves through these states. The<br />

program determines the current state from the commands that it has already encountered<br />

and then identifies which commands are allowed in that state.<br />

Figure A.1 Program states<br />

Initial<br />

Setup<br />

Input<br />

Program<br />

1687<br />

Transformation<br />

Program<br />

Procedure Finish

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

Saved successfully!

Ooh no, something went wrong!