Date: Thu, 3 Oct 2002 18:28:04 +0400
Reply-To: LRS <lrs@unn.ac.ru>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: LRS <lrs@unn.ac.ru>
Subject: Re: how to close the file via syntax
Content-Type: text/plain; charset="koi8-r"
Thanks a lot, it helps.
Hovewer, another problem rising. If I change my data file (temp2.sav)
manualy between two runnings of the second part of the syntax,
SAVE OUTFILE='c:\temp2.sav'.
COMPUTE nobreak=1.
AGGREGATE OUTFILE='c:\temp.sav'
/BREAK=nobreak
/maxy=MAX(y).
MATCH FILES FILE=*
/TABLE='c:\temp.sav'
/BY=nobreak.
COMPUTE z=x/maxy.
EXECUTE.
it does not affect the result of MATCH FILES comand. The aggregated file
(temp.sav) changes, but the original file (temp2.sav) does not. Say, I
putting the large value to 'y' and the 'maxy' variable changes in
'temp.sav', but not in 'temp.sav' after matching files.
Saving data file and caching after each command not help.
Anton
----- Original Message -----
From: Raynald Levesque
Newsgroups: bit.listserv.spssx-l
To: SPSSX-L@LISTSERV.UGA.EDU
Sent: Thursday, October 03, 2002 3:32 PM
Subject: Re: how to close the file via syntax
Hi
Try the following:
Add a SAVE OUTFILE='c:\temp2.sav'.
before the COMPUTE nobreak=1.
See also
http://pages.infinit.net/rlevesqu/DebuggingSyntax.htm#FileIsUsed
HTH
Raynald Levesque rlevesque@videotron.ca
Visit my SPSS Pages http://pages.infinit.net/rlevesqu/index.htm
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of LRS
Sent: October 3, 2002 4:29 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: how to close the file via syntax
Hi,
I use the syntax of kind that I found in Raynald's site (see below). I need
to run it several times in a syntax file and I whant to use the same
temporary file (c:\temp.sav) each time. However, when I run this syntax
second time (starting from "COMPUTE nobreak...", without redefining data)
the error occures (Error # 62 in column 19. Text: c:\temp.sav >The file is
already in use.) I suspect that I have to close somehow the file c:\temp.sav
to proceed, but how to do that?
Thanks in advance.
Anton Balabanov,
Chair of Applied Statistics, Assistant
University of Nizhny Novgorod, Russia
DATA LIST LIST /x y.
BEGIN DATA
2 5
3 3
4 4
END DATA.
LIST.
COMPUTE nobreak=1.
AGGREGATE OUTFILE='c:\temp.sav'
/BREAK=nobreak
/maxy=MAX(y).
MATCH FILES FILE=*
/TABLE='c:\temp.sav'
/BY=nobreak.
COMPUTE z=x/maxy.
EXECUTE.