Hi Richard,
I was curious to replicate the error that Mark was having and then try it again with the CACHE command. However, I tried your suggested syntax, and did not get any errors. I am using version 14.0.2. Here's my syntax GET FILE 'C:\Kim\temp\junk.sav'. COMPUTE junk1 = sum(Age,Ethnicity) . COMPUTE junk2 = sum(Item1, Item2, Item3) . EXECUTE . CORRELATIONS /VARIABLES= junk1 junk2 /PRINT=TWOTAIL NOSIG /MISSING=PAIRWISE . COMPUTE junk3 = sum(Item4, Item5) . EXECUTE . SAVE OUTFILE='C:\Kim\temp\junk.sav'. I'm still hopeful that a strategicly placed CACHE and EXECUTE will solve a problem I've been having with a file I can't delete. I need to close it before I can delete it, but it won't let me close it. I'll try Caching it first. Best regards, Kim Richard Ristow <[hidden email]> wrote: At 01:28 PM 1/18/2007, Mark A Davenport MADAVENP wrote: >I have CLOSED the Enrolled_Cohort_2002.sav file. Why in the hell >can't I reopen it under that name? Why can't I save the now >'Untitled' file under the same name? How can a closed file be >contending with anything? > >>Warning # 5334. Command name: SAVE >>The SAVE command has succeeded. However, due to contention for the >>specified file, the data have been saved to a file with a different >>name. >> >>Saved to C:\Ad Hoc Requests\Adverse_Impact_McKinney\SDF >>Data\Enrolled_Cohort_F. Possibly naive question: in what sense did you 'close' Enrolled_Cohort_2002.sav? And what version of SPSS, if any, were you running, and didn't have this problem? Anyway, you can get situations like this with any version of SPSS that uses Virtual Active Files (VAF). I don't know when that was introduced; SPSS 12? Anyhow, 14 and at least a release or so before have it. If you have a version running, there's an easy check: versions that have the CACHE command use the VAF. A VAF is supposed to 'look like' the old familiar working file that's kept in a scratch file on disk; but it isn't. Instead, SPSS 'remembers' where the original file came from (DATA LIST, GET FILE, etc.), and keeps all transformations you have applied to it. When you run a procedure, or otherwise use the active file, SPSS reads the original source and applies transformations, instead of reading from a scratch file. This always saves disk space. It can either save time or cost a lot of time, depending on things like how fast it is to read the original input. And it can foul you up in just this way. If you have GET FILE My_File.sav. <transformations> <procedure> <transformations> ... SAVE OUTFILE=My_File.sav. you'll get the error you reported, because My_File.sav is kept open to be input for the VAF. The solution to this is a CACHE command. I think putting one just before the SAVE will do fine. And the question may be naive, because you may already know all this and have taken it into account. In which case, you should probably post the simplest syntax you can find, that fails. -Best of luck, Richard Ristow Anyway, SPSS versions that have VAF capabilities, try to use them. |
Free forum by Nabble | Edit this page |