* Subsets. * Selecting variables. * GET FILE options . get file='Y:\SPSS\Data\Cars.sav' /keep=mpg weight. dataset name DataSet1 window=front. get file='Y:\SPSS\Data\Cars.sav' /drop=engine horse weight. dataset name DataSet1 window=front. * SAVE OUTFILE options . get file='y:\spss\data\Employee data.sav'. dataset name DataSet1 window=front. save outfile="u:\employees1.sav" /keep=id gender salary salbegin. * note the working data set is not changed and you continue working with the full data set. frequencies variables=gender. save outfile="u:\employees2.sav" /drop=bdate salary jobcat minority. * DELETE VARIABLES . get file='y:\spss\data\1991 U.S. General Social Survey.sav'. dataset name DataSet1. delete variables race sex. /*error, DELETE cannot be processed while transformations are pending */. get file='y:\spss\data\1991 U.S. General Social Survey.sav'. dataset name DataSet1. compute black=(race=2). delete variables race. frequencies variables=black. /* This works because EXECUTE clears pending transformations */. get file='y:\spss\data\1991 U.S. General Social Survey.sav'. dataset name DataSet1 WINDOW=FRONT. compute black=(race=2). execute. delete variables race sex. frequencies variables=black. /* This works because FREQUENCIES clears pending transformations */. get file='y:\spss\data\1991 U.S. General Social Survey.sav'. dataset name DataSet1 WINDOW=FRONT. compute black=(race=2). frequencies variables=black. delete variables race. /* This works because DATASET ACTIVATE clears pending transformations */. get file='y:\spss\data\1991 U.S. General Social Survey.sav'. dataset name DataSet1 WINDOW=FRONT. compute black=(race=2). dataset activate DataSet1. delete variables race sex. frequencies variables=black.