Closing a file in SPSS 14.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Closing a file in SPSS 14.

Boris Ratchev
Hello everyone,

I'm looking for a solution to the following problem: I
need to close a data file in SPSS 14 without quitting
the whole application using syntax or script. Does
anyone know a good solution to this?

Thanks much.

Boris Rachev
ICFI
Fairfax, VA



____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.
Reply | Threaded
Open this post in threaded view
|

Re: Closing a file in SPSS 14.

Richard Ristow
Doesn't look like anybody's answered this.

At 10:26 AM 12/14/2006, Boris Ratchev wrote:

>I need to close a data file in SPSS 14 without quitting the whole
>application using syntax or script.

I would say this depends on in what role the file is open.

If you read a file by almost any means - GET FILE, DATA LIST, GET... -
the file will usually stay open. That's because SPSS sets up a Virtual
Active File; that is, rather than writing the working file to disk, it
rereads the input each time, applying all accumulated transformations.
(That always saves disk space. Depending on circumstances it can save,
or cost, considerable processing time.) The CACHE command writes the
working file to a scratch disk file, after which the input file should
be closed. Reading a different file, discarding the current working
file, will also close its input.

(Question: If the working file is a VAF, and you save it as an inactive
dataset - DATASET NAME followed by starting a new active file - is the
inactive dataset always written to disk, or does it remain a virtual
file?)

If you write a file from a procedure (OUTFILE=...), I believe the file
is always closed when the procedure terminates.

I believe the output file is closed immediately when a SAVE completes.

If you write a file from a transformation program (WRITE or XSAVE), the
file remains open until the transformation program completes. (In the
SPSS syntax stream, this means until after the EXECUTE or procedure or
SAVE that closes the transformation program.) It's closed then, though.

Is any one of these the case you're looking at? If so, do you see any
behavior that contradicts what I've written? (Which you might. I'm
giving you the best of an informed understanding, but that doesn't mean
perfect.)

-Good luck to you,
  Richard Ristow