There are 35 waves of the British Social Attitudes Survey (BSAS). Variables with the same name used in different years have different specifications for formats, missing values, levels etc. The metadata in the original files are not compatible between years and need to be modified so the files can be merged for analysis across time. I have created a cumulative SPSS "mother" in which the metadata for all variables is now compatible. It contains all variables used in all surveys 1983 to 2017 (no survey 1988 or 1992) but in reverse year order.
The General Data Protection Regulations (GDPR) mean that I cannot upload actual data to my site. Until Natcen and UKDS decide whether to use my mother file, users wishing to perform analysis across time must download the individual year files from UKDS and fend for themselves. However I have been asked to supply the syntax needed to make files mutually compatible and then merge them. Doing this piecemeal for any combination of files would be tedious, but I have generated some test syntax for the 2016 and 2017 files.
Desktop older BSAS_Merge_files contains three files:
bsamother_ zerocases _ sav (JKP's brilliant suggestion to get round General Data Protection Regulations: the file contains no cases)
bsa16_to_ukda.sav (Original data for 2016: no variable year)
bsa2017_for_ukda.sav (Original data for 2017: no variable year)
Proceed as follows:
Double click on bsamother_zerocases.sav
bsamother_zerocases.sav becomes [Dataset1]
Double click on bsa16_to_ukda.sav
bsa2016_to_ukda.sav becomes [Dataset2]
Double click on bsa2017_for_ukda.sav
bsa2017_for_ukda.sav becomes [Dataset3]
I would like to know if there is way to automate the process in the following syntax.
Syntax file 20172016merge2b.sps
* Encoding: UTF-8.
title 'Using double click '.
*Source files are in desktop folder BSAS_Merge_files.
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command