Error # 62: "The file is already in use"

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

Error # 62: "The file is already in use"

mwulfe
I am trying to execute a syntax file in SPSS 19. It has a large macro that opens a number of data files several times, for aggregation, saving, and appending.  The Error # 62 message is displayed in the output in the code that calls the macro.  

The macro is called about 20 times.  After running the same, unchanged syntax file multiple times, the error occurs at different points in the output each time.  I have tried inserting "dataset close all" everywhere I can, and the same thing keeps happening.  I also get a "Warning # 67.  Command name: get file", "The document is already in use by another user or process..."  I am the only user, and no other process is running that would access any of these files.

Can anyone suggest a solution to this?

Thanks in advance,
Martin
Reply | Threaded
Open this post in threaded view
|

Re: Error # 62: "The file is already in use"

Richard Ristow
At 06:45 PM 8/1/2012, mwulfe wrote:

>I am trying to execute a syntax file in SPSS 19. It has a large
>macro that opens a number of data files several times, for
>aggregation, saving, and appending.  The Error # 62 message is
>displayed in the output in the code that calls the macro.
>
>The macro is called about 20 times.  After running the same,
>unchanged syntax file multiple times, the error occurs at different
>points in the output each time.  I have tried inserting "dataset
>close all" everywhere I can, and the same thing keeps happening.  I
>also get a "Warning # 67. Command name: get file", "The document is
>already in use by another user or process..."  I am the only user,
>and no other process is running that would access any of these files.

Recent SPSS releases don't actually save active files (or any
datasets) to disk.Rather, they keep the code that was used to load
the active file and re-run it if the file is used again; this is
called a "virtual active file".

One problem is, SPSS hangs onto any file used to load a dataset, in
case it needs to be read again. That means the file is 'in use' and
not available for anything else, even another SPSS command.

Try a "CACHE" command after you load any dataset; if you load it and
aren't going to use it until later, put an "EXECUTE" command
(imagine! me, saying that!) after the CACHE. That will get SPSS to
store a copy of the dataset, and release the files used to build it.
It'll use more scratch disk space, but this may solve your problem.

-Best of luck,
  Richard Ristow

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Error # 62: "The file is already in use"

Albert-Jan Roskam
In reply to this post by mwulfe
Hard to say without any code. It sounds like you're trying to open a file for reading that is still open for writing, or vice versa.
Perhaps the file is still open as a virtual active file (VAF), though it seems that later versions of spss do not easily get "file contention errors". Anyway, I'd try to use CACHE (to consolidate a VAF into a scratch file, perhaps followed by EXECUTE)  and NEW FILE at strategic places
 
Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
From: mwulfe <[hidden email]>
To: [hidden email]
Sent: Thursday, August 2, 2012 12:45 AM
Subject: [SPSSX-L] Error # 62: "The file is already in use"

I am trying to execute a syntax file in SPSS 19. It has a large macro that
opens a number of data files several times, for aggregation, saving, and
appending.  The Error # 62 message is displayed in the output in the code
that calls the macro.

The macro is called about 20 times.  After running the same, unchanged
syntax file multiple times, the error occurs at different points in the
output each time.  I have tried inserting "dataset close all" everywhere I
can, and the same thing keeps happening.  I also get a "Warning # 67.
Command name: get file", "The document is already in use by another user or
process..."  I am the only user, and no other process is running that would
access any of these files.

Can anyone suggest a solution to this?

Thanks in advance,
Martin



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Error-62-The-file-is-already-in-use-tp5714557.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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


Reply | Threaded
Open this post in threaded view
|

Re: Error # 62: "The file is already in use"

nikkistork
I am having the same problem in SPSS 24, when I try to open my datafile I get
error code "The document is already in use by another user or process. If
you make changes to the document they may overwrite changes made by others
or your changes may be overwritten by others"

Can someone please help me, and explain  step by step (in simple language)
how to fix this?

"I'd try to use CACHE, followed by EXECUTE and NEW FILE at strategic places"
is just like Chinese to me.

<http://spssx-discussion.1045642.n5.nabble.com/file/t341606/SPSS.png>




--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Error # 62: "The file is already in use"

Kirill Orlov
This may not solve it, but you just try:

CACHE.
EXECUTE.


12.05.2019 12:33, nikkistork пишет:
I am having the same problem in SPSS 24, when I try to open my datafile I get
error code "The document is already in use by another user or process. If
you make changes to the document they may overwrite changes made by others
or your changes may be overwritten by others"

Can someone please help me, and explain  step by step (in simple language)
how to fix this?

"I'd try to use CACHE, followed by EXECUTE and NEW FILE at strategic places"
is just like Chinese to me.

<http://spssx-discussion.1045642.n5.nabble.com/file/t341606/SPSS.png> 




--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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 [hidden email] (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