1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
*(Q) How can I automatically delete all variable labels in a given sav file.

*(A) Posted to SPSSX-L by Raynald Levesque on 2002/03/08.

SET MPRINT=no.
*////////////////.
DEFINE !nolabel(fname=!TOKENS(1))
GET FILE=!fname.
N OF CASES 1.
FLIP.
WRITE OUTFILE='c:\\temp\\delete var labels.sps' 
	/"VARIABLE LABEL "case_lbl ".".
EXECUTE.
GET FILE=!fname.
INCLUDE 'c:\\temp\\delete var labels.sps'. 
!ENDDEFINE.
*////////////////.

* Call macro to delete all variable label.
SET MPRINT=yes.
!nolabel fname='c:\\program files\\spss\\employee data.sav'.
SET MPRINT=no.