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 (June 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Jun 2008 08:16:59 -0500
Reply-To:     "Oliver, Richard" <roliver@spss.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Oliver, Richard" <roliver@spss.com>
Subject:      Re: FAQ: Avoid using EXECUTE
Comments: To: Christian Ganser <Christian.Ganser@soziologie.uni-muenchen.de>
In-Reply-To:  A<485B5480.5030301@soziologie.uni-muenchen.de>
Content-Type: text/plain; charset="us-ascii"

The command is sometimes needed and often useful.

It's needed, for example, if you use commands such as WRITE or XSAVE to write out data files and you need those files closed before you can continue but the next step in your job doesn't contain any procedure commands that read the data.

It's useful, for example, if you want to check the intermediate results of transformations when testing/debugging complicated jobs.

By default, the GUI automatically generates EXECUTE syntax after each transformation because many users (like you) expect to see the results immediately. (BTW, you can turn this off in Edit>Options>Data.) In the absence of the EXECUTE command, transformations are not executed immediately because it can save a great deal of processing time for large datasets if each block of transformations is processed in a single step.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Christian Ganser Sent: Friday, June 20, 2008 1:56 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: FAQ: Avoid using EXECUTE

Funny discussion imho which arises from time to time. Why is there a command one shouldn't use? Why aren't transformations carried out immediately as in other software-packages? And: Is EXECUTE realy a major reason for slow behaviour of SPSS? This depends on the size of the dataset, and the new interface definitely wastes much more time than some executes on some 1000 cases. So to me it seems the behaviour of SPSS should be improved in this respect, not the behaviour of the users.

Richard Ristow wrote: > I haven't posted this for a long time, but > several recent postings have EXECUTE or exe. > statements in example code. None of those > recently posted are needed, and it's important to > know this; unnecessary EXECUTEs can slow processing badly. > > (For a recent EXECUTE that is needed, see my "Re: > Question: print or list in if condition", Wed, 11 Jun 2008.) > > > FAQ: Avoid using EXECUTE > > An occasional reminder: there are very few occasions when EXECUTE is > needed. > > EXECUTE is not needed after a transformation, or > several transformations; the transformations are > carried out when they are needed, when the next procedure or SAVE is > executed. > > It's confusing that you don't *see* > transformation results in the Data Editor, unless > you run EXECUTE, or click "Run Pending > Transformations" (which is the same thing). It's > often worth doing that, just to see what you've > done. But if you don't, the next procedure or > save will still get the results of the transformations. > > EXECUTE is treated very well in section "Use > EXECUTE Sparingly" in any edition of Raynald > Levesque's book: Levesque, Raynald, "SPSS(r) > Programming and Data Management, A Guide for > SPSS(r) and SAS(r) Users". SPSS, Inc., Chicago, IL, 2005. > (Downloadable free from the SPSS, Inc., Web site.) > > And EXECUTE isn't harmless. EXECUTE makes SPSS > read the whole data file; multiple EXECUTEs can > badly slow processing of big files. > > ..................... > The logic of EXECUTE: > > In the transformations, > > COMPUTE C = A + B. > EXECUTE. > COMPUTE D = E/C. > EXECUTE. > > At the first EXECUTE, the file is read; the value > of C is computed for every case; and the > resulting file (with all variables) is saved, as > a scratch file. At the second EXECUTE, the file > is read again; D is computed for every case, > using the computed value of C; and the file is > saved again. Five passes through the data: > reading twice, writing once. (Recent versions of > SPSS do optimizations that will save some of this.) > > If you write, instead > > COMPUTE C = A + B. > COMPUTE D = E/C. > > and then whatever procedure or SAVE is desired, > the computations are done when the file is read > for the procedure or SAVE, needing no data passes > for the computation. In this logic, SPSS computes > the value of C for every case, then computes the > value of D for the same case, and then proceeds to the next case. > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD >

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


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