Thanks
Create the new variable in the usual fashion. E.g.,
STRING newstringvar (a8).
NUMERIC newnumericvar (f5.0).
compute newnumericvar2 = { some expression }.
exe.
Then re-order the variables using the /KEEP subcommand of either MATCH
FILES or ADD FILES. E.g., suppose you want to insert NEWVAR between
OLDVAR6 and OLDVAR7.
match files
file = * /
keep = oldvar1 to oldvar6 newvar oldvar7 all .
exe.
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
> Then re-order the variables using the /KEEP subcommand of either MATCH
> FILES or ADD FILES. E.g., suppose you want to insert NEWVAR between
> OLDVAR6 and OLDVAR7.
>
> match files
> file = * /
> keep = oldvar1 to oldvar6 newvar oldvar7 all .
> exe.
Some very old version of SPSS, or maybe it was SPSS/PC+, had a
MODIFY VARS command with a REORDER subcommand that was designed
just for reordering variables. I wonder why it didn't survive
over the years.
--
"The road to hell is paved with convenient shortcuts."
--Peter da Silva