1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
* How to delete or reorder variable names.

* Raynald Levesque 2002/02/09.

DATA LIST LIST /id sex var1 z age.
BEGIN DATA
1 1 1 1 25
2 2 2 2 35
3 1 5 0 65
END DATA.

* TO change the order to the variables to age id sex var1 z.
MATCH FILES FILE=* /KEEP=age ALL.
LIST.

* NOTE: In the above command, ALL means all remaining variables not previously named.

* Use the following to delete variables var1, z and age.
MATCH FILES FILE=* /DROP=var1 z age.
LIST.