Command language and syntax windows

Important: The syntax editor, while trying to help you to build correct commands, tends to overwhelm a beginner, as it shows the full complexity of the various commands. We recommend turning these features off (See Syntax editor options ) to learn how to turn them off. The screenshots on this learning site have these options turned off. Please turn them of as well.

When you are using for instance Analyze > Descriptive Statistics > Frequencies to produce a frequency table and a bar chart, SPSS does two things behind the scene:

  1. It builds - from what you select - a Frequency command, based on the selected variables and options.
  2. Submits the command to the SPSS Processor to actually produce the frequency table.

Instead of using menus, you can use command language directly to achieve exactly the same.

Let us start this by showing that using menus and command language mix in fact quite well, and you can use the menu system to learn command language!

Analyze > Descriptive Statistics > Frequencies displays a frequency table, but instead of hitting the OK button to produce the frequency table to execute the command and dismiss the dialog, hit the Paste button instead.

SPSS will then paste the command syntax to a Syntax Window. As there was no open Syntax window, SPSS created a new one containing the syntax for producing a frequency table.

To actually produce the frequency table you will have to select the text of the command (actually placing the cursor within the text is sufficient) and then hit the (Run) button.

 

Back
© Copyright, Eugene Horber, U. of Geneva and FORS, 2024