Nebraska High School

How do I use the SPSS syntax file?

Follow the instruction below to use the SPSS syntax file.

  1. Save the ASCII-formatted data file (.dat) and the SPSS syntax file (.sps) to your computer.
  1. Open the SPSS program.
  1. In the dialogue box “SPSS for Windows” that opens at start-up of the program, select “Open another type of file”. With the “More Files…” backlit, click OK at the bottom of the box.
  1. Browse until you find the SPSS syntax file (.sps) you saved to your computer.
  1. Select the syntax file and click “Open”. The .sps file will open in the SPSS Syntax Editor window.

The program will import the ASCII data file, create a SPSS data file, and apply the formats and labels.

Please note: The first line of code (DATA LIST FILE="C:\XXH2005_YRBS_Data.dat"/) tells the program where to find the ASCII data file.  If you saved the ASCII data file to a drive other than your C drive, change the C (bolded in the example line above) to indicate the appropriate drive. And, if you would like the data file saved to a drive other than your C drive, the appropriate drive will have to be indicated in the following two lines of code which appear after the input statement:



  1. Select “All” from the run menu – this will create a labeled and formatted SPSS data set (.sav).