SPSS Tips & Tricks #11 – syntax intro

 In Tips & Tricks

The code behind all clicks you do in SPSS Statistics, can be saved and reused. For that, you use the syntax and work in a separate syntax file. Another good thing is that you get a documentation of what you have done, if you save all your commands into the syntax file.

It’s very simple to start using it, I will show you that today.

Instead of click “OK”-button, click the “Paste”-button in a command you will do, see example.

And automatically theĀ  code behind this command will be pasted into the syntax window, like this:

This is an explanation of how a syntax code is built up.

After the text VARIABLES= you will see the variable or variables that the command will work with. In this example it will be a frequency table of the variable Gender:

To run the command: mark the text and click on the green triangle in the tool bar.


If you save the syntax you will get a file name ending with .sps.

So now it’s your turn to try, just click “paste” and see what happens.


error: Content is protected !!