Delete Variable Syntax

#1
Hi all,

Using syntax, is there way to delete all variables in a dataset, listing only those you want to keep? Example:

Variables: A/B/C/D/E

Standard Syntax (keeping A/B/C)
DELETE VARIABLES
D
E.

Syntax to keep A/B/C by listing A/B/C???

Thanks very much.
 
#2
Open your data set and use the following syntax
MATCH FILES FILE = *
/KEEP A B C .
This use of MATCH and KEEP allows you to keep the variables you want; You can also rearrange the order if you want like B, C, A.