SPSS Syntax: Why Supervisors Ask for It and How to Save It

SPSS Syntax: Why Supervisors Ask for It and How to Save It

Your supervisor has read the results chapter and now asks: “Can you send me the syntax?” What exactly do they want, and how do you produce it if you clicked through menus? An SPSS syntax file is a plain-text .sps file containing the commands behind every table you report. It lets someone else rerun your analysis and get the same numbers, which is why supervisors and examiners ask for it.

This article is part of our guide How to Write a Master’s Thesis by the Mastermind PhD team and relates to our Statistical Analysis service. Sources last checked: November 2026.

What is an SPSS syntax file? It is a text file with the extension .sps that stores SPSS commands (for example FREQUENCIES, T-TEST or REGRESSION) with all their options. Opened in the Syntax Editor, it can be run line by line or all at once to reproduce the output. Because it is plain text, it can also be read in any text editor.

What is an SPSS syntax file?
In short – the Mastermind PhD team

Why do supervisors ask for the SPSS syntax file?

  • Checking: a supervisor can see which cases were selected, how variables were recoded and which options were ticked, without sitting next to you.
  • Reproducibility: if the data change (a corrected entry, an excluded case), the whole analysis can be rerun in seconds instead of repeating dozens of menu clicks.
  • Defense: a question such as “did you reverse-code item 7?” is answered by one line in the file.
  • Archiving: many programs and journals ask for data and analysis scripts at submission.

How do you create an SPSS syntax file? Three ways

MethodWhen to use itHow
Paste buttonBefore running each analysisSet up the dialog, click Paste instead of OK
Output logAnalyses already run in this sessionCopy the commands shown in the Viewer log
Journal fileAnalyses run earlier, output closedOpen the .jnl file recorded by SPSS

1. The Paste button. Almost every dialog box has a Paste button. IBM’s documentation describes it as the easiest way to build a syntax file: instead of running, SPSS writes the command into a Syntax Editor window, opening one if none is open. Run it from there with the green arrow or Run > Selection.

2. The output log. If Display commands in the log is enabled in Edit > Options > Viewer, each output block is preceded by its command. Copy those log entries into a syntax window.

3. The journal file. SPSS also records commands in a journal (.jnl) file. Its location is shown under Edit > Options > File Locations. Open it with File > Open > Syntax, choose “All Files”, then save the relevant part as a new .sps file.

📱 Ask a statistician about your data — Send a short description of your instrument and sample size on WhatsApp and get a suitable analysis plan. Every analysis comes with the raw SPSS file and a results report.

SPSS syntax file: what this guide covers - Why do supervisors ask for the SPSS syntax file?، How do you create an SPSS syntax file? Three ways، How do
What this guide covers – the Mastermind PhD team

How do you save and organize the SPSS syntax file?

With the Syntax Editor active, choose File > Save As and give it a clear name, such as thesis_analysis_v3.sps. Then:

  • Add comments: a line starting with an asterisk and ending with a full stop, such as * H2: burnout by gender.
  • Order the file as the chapter is ordered: data preparation, reliability, descriptives, then each hypothesis.
  • Include a GET FILE command at the top so it opens the right data file.
  • Rerun the whole file once on a clean copy of the data and check that every number in your tables matches.

What should you send with the SPSS syntax file?

Send the .sps file, the .sav data file it opens and, if requested, the output (.spv) or a PDF of it. Remove names or other identifying information from the data before sharing, as your ethics approval requires.

If you work with a statistician, ask for the syntax as well. The Mastermind PhD team delivers the raw SPSS file with every analysis; statistical analysis starts from EGP 10,500 on the live service page.

📱 Ask on WhatsApp now — 5 years of experience across all disciplines and 14 academic services. Two-stage payment (80/20); revisions are free until supervisor approval, within 30% of the chapter.

SPSS syntax file: Can I get syntax for an analysis I ran last week?
Common question – the Mastermind PhD team

Frequently asked questions

Can I get syntax for an analysis I ran last week?

Often yes, from the journal file, as long as it is set to append rather than overwrite at each session (Edit > Options > File Locations). If the output file is saved and the log was displayed, the commands are there too.

Do I need to learn to write syntax by hand?

No. Pasting from dialogs produces correct syntax. Learning to read it and add comments is enough for most theses.

Can I open an .sps file without SPSS?

Yes. It is plain text, so Notepad or any text editor shows it, although only SPSS can run it.

Does the syntax contain my data?

No. It contains commands only. That is why you send the .sav file alongside it.

Should the SPSS syntax file go in the appendix?

Only if your program asks for it. Most supervisors want the file itself rather than printed pages.

Sources

Sources last checked: November 2026. This article is general educational guidance and does not replace your university regulations or your supervisor’s instructions. How we prepare our content.