Introduction
Merging data with ADD FILES
can result in nonsensical data. This occurs when variables or values have different meanings over files. By comparing dictionaries over files, inconsistently coded variables are quickly detected.
So What's the Problem?
When files are merged with ADD FILES
, inconsistent dictionary information is discarded. This will happen, for example, if a variable v1
means "gender" in one file and "employment status" in another. In this case, values indicating gender will seem to indicate employment status or vice versa. For a demonstration, see SPSS Add Files - Cautionary Note.
So What's the Solution?

- Put the files you'd like to merge in a single folder. Make sure there's no other .sav files in this folder.
- Close all open datasets.
- Make sure you have the SPSS Python Essentials installed.
- Download and install SPSS Dictionary Checker. Note that this is an SPSS custom dialog.
- Go to
. Copy-paste the path to the data folder into the dialog and select whether you'd like a syntax file with a "save list" of variables to be written. Click and run the pasted syntax.
- Clicking the tool's button will take you to this tutorial. We very much appreciate your feedback on it.
Explanation of the Dictionary Overview

- This command will always produce a new dataset presenting an overview of the dictionary comparison.
- Each row represents either a value or a variable with value labels and variable labels over different source files.
- Empty cells indicate that either the variable wasn't present in one or more source files or no label was defined.
- Value inconsistencies (
val_incon
) is (the number of distinct labels - 1). Empty cells are not counted as distinct labels. - Variable inconsistencies (
var_incon
) is the sum of all value inconsistencies for each variable. - Variables are sorted in descending order according to variable inconsistencies. That is, the "worst" variables are moved to the top of the dataset.
- Variables with zero variable inconsistencies are removed from the overview by default. Fully consistent data files, therefore, will result in an empty new dataset.
- The command is case insensitive. All labels are converted to lower case before comparing them.
Notes on the Syntax File
- The dictionary check may write a new syntax file containing all consistently coded variables.
- The file is called "savelist.sps" and will appear in the source data folder.
- If this file already exists, it will be overwritten.
- Before use, variables can be added to or removed from this "save list".
- In order to use it, first merge all files and then run this syntax file over the result. It will drop all variables that are not in the "save list".
THIS TUTORIAL HAS 14 COMMENTS:
By Bret on July 27th, 2017
Hello Ruben,
Two issues. First is I am unable to get this to run run. The last line of the output reads: "AttributeError: 'NoneType' object has no attribute 'lower'" Also, no other files are created in the directory.
Secondly, to run this dialogue, the 4th bullet under the "What's the solution?" header says:
Go to Utilities SPSS Menu Arrow Search Syntax Files.
Do you really mean to say "Search Syntax" over "Dictionary Check Over Files"
BTW - This is a wonderful resource.
Cheers,
Bret
By Ruben Geert van den Berg on July 28th, 2017
Hi Bret!
This is a rather old tool so I'll perhaps remove it altogether. Recent SPSS versions have an extension for this if the SPSS Python Essentials have been installed. Like so, many of my tools have been added to SPSS -without crediting me for the ideas by the way but that's a different story.
I'm not sure exactly which extension compares dictionaries, perhaps Utilities => Process data files.
You're right about the copy-paste error in the tutorial.
By Rubie on February 5th, 2022
Hello. I'm really interested in using this SPSS Dictionary Checker, but I am unable to use it. I get the following error, and none of the links are active and throw me a 'article not found error'
Has this Dictionary Checker been updated?
Thank you.
SPSS Version 27
Error: Dictonary_Check_over_Files cannot be installed because it does not have a valid syntax template.
By Ruben Geert van den Berg on February 5th, 2022
Hi Rubie!
I haven't tested this with SPSS 27 but it may no longer work.
I don't have any plans for updating it, I might just remove the tool altogether from the website.
Kind regards,
SPSS tutorials