LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 29 Mar 2007 18:19:22 -0400
Reply-To:     Richard Ristow <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Richard Ristow <>
Subject:      Suggest: Allow LEAVE, with scratch variables
Comments: To: SPSS suggestion line <>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Here's a booby-prize suggestion, maybe, but it would help a lot with some kinds of testing.

From the SPSS 15 Command Syntax Reference, though it's been true more or less forever (p.34, section "Scratch Variables"):

.. Scratch variables are initialized to 0 for numeric variables or blank for string variables. .. SPSS does not reinitialize scratch variables when reading a new case. .. Do not use LEAVE with a scratch variable.

And p.895, article on "LEAVE" command:

LEAVE suppresses reinitialization and retains the current value of the specified variable or variables when the program reads the next case. It also sets the initial value received by a numeric variable to 0 instead of system-missing. [...] LEAVE cannot be used with scratch variables. ..................... In other words, scratch variables *always* behave as regular variables do, for which LEAVE is specified.

The documentation should make this clear, of course. I understand that's in the works.

HERE, I suggest: accept LEAVE, with scratch variables. Of course, it doesn't change anything.

You'd use it like this:

NUMERIC #temp01 #temp02 #status (F3). LEAVE #temp01 #temp02 #status.

And you'd do it so, if you wanted to switch to regular variables for testing, you could change to, say,

NUMERIC @temp01 @temp02 @status (F3). LEAVE @temp01 @temp02 @status.

and the renamed variables would work the same way.

Back to: Top of message | Previous page | Main SPSSX-L page