match files file = * /drop = temp1 temp2 .
will drop variables temp1 and temp2 .
Regards,
--
=-=-=-=-=-=-=-=-=-==-=-=-=
Mike Lacy, Ft Collins CO 80523
voice (970) 491-6721
the following line deletes variables a,b and c.
ADD FILES FILE=* /DROP=a b c.
HTH
Raynald Levesque rlev...@videotron.ca
Visit My SPSS Pages: http://pages.infinit.net/rlevesqu/index.htm
Another way to do this is to use the #varname
convention. Variables beginning with # are treated as temporary
by SPSS. Run the following program to see this.
data list free / x
begin data
1 2 3 4 5
end data
comp #new = x*2
comp x2 = #new
list
Best wishes
Jim
============================================================================
James M. Clark (204) 786-9757
Department of Psychology (204) 774-4134 Fax
University of Winnipeg 4L05D
Winnipeg, Manitoba R3B 2E9 cl...@uwinnipeg.ca
CANADA http://www.uwinnipeg.ca/~clark
============================================================================
*BUT VERY IMPORTANT!!!!*
Be careful though as they are initialized to 0 (rather than sysmis),
and
not reinitialized when reading the next case. They are also discarded
after any proceedure (including EXECUTE commands , TEMPORARY etc... )
Note that since they are NOT reinitialized they can nicely work as an
alternative to a LAG function -or LEAVE command-
( assuming you don't need them for procedures, weighting or retention
in the file) . If you require them for analysis then you will need to
set the value of some permanent variable to the value of the scratch
variable. In that case use a MATCH or ADD FILES command to drop the
unwanted variables as Reynald suggested - BUT, be careful as I believe
the active file is then nameless (at least that used to be the case,
perhaps different in newer versions).
See the Syntax Reference guide for the full blown down and dirty.
*BE CAREFUL TO TEST ANY SYNTAX AND INSPECT RESULTS VERY CAREFULLY
for side effects as scratch variables behave quite differently than
normal variables* !!!).
HTH, Neila
jim clark <cl...@uwinnipeg.ca> wrote in message news:<Pine.GSO.4.21.021217...@io.uwinnipeg.ca>...