Error associated with using MSAVE statement in MATRIX under repeated run

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

Error associated with using MSAVE statement in MATRIX under repeated run

Kirill Orlov
When MSAVE is used in MATRIX session to save matrix the following error appears after *repeated* run of the same program:

>Error # 33 in column 1024.� Text: (End of Command)
>File is already in use within IBM SPSS Statistics and cannot be used in
>another context until the conflicting use has terminated.
>Execution of this command stops.

I encounter the error in SPSS 20, SPSS 15. I believe other versions produce it too.
What might it be?

Demonstration is below.

*Create data.
data list list /v1 to v5.
begin data
1.000� .� � � � .� � � � .� � � � .
� .508 1.000� .� � � � .� � � � .
� .347� .583 1.000� .� � � � .
� .204� .243� .294 1.000� .
� .108� .166� .213� .250 1.000
end data.
dataset name mat.

*Run (this works correctly).
matrix.
get m /missing= 1.
compute m= m&*t(m).
print m.
msave m /type= corr /outfile= * /variables= v1 to v5.
end matrix.

*Run this or close the untitled dataset manually.
dataset activate mat.

*Run again that same MATRIX program.
matrix.
get m /missing= 1.
compute m= m&*t(m).
print m.
msave m /type= corr /outfile= * /variables= v1 to v5.
end matrix.

*Enjoy the error.
Reply | Threaded
Open this post in threaded view
|

Re: Error associated with using MSAVE statement in MATRIX under repeated run

Bruce Weaver
Administrator
Well-spotted, Kirill.  When I run your example, I get that same error with v21.0.0.1 (64-bit) running under Windows 7 Profession (SP1).  

The example you've posted is similar to one I posted in the thread on filling in the top half of a correlation matrix.  I had the same issue with that example, but didn't worry about it too much at the time, because my matrix program (with MSAVE) was working properly for repeated runs in the larger context in which I was using it.  

But in hindsight, it is a good question why this error is occurring.  As Kirill implies, this does not occur if one replaces MSAVE with SAVE.

Cheers,
Bruce


Kirill Orlov wrote
When MSAVE is used in MATRIX session to save matrix the following error
appears after *repeated* run of the same program:

 >Error # 33 in column 1024.  Text: (End of Command)
 >File is already in use within IBM SPSS Statistics and cannot be used in
 >another context until the conflicting use has terminated.
 >Execution of this command stops.

I encounter the error in SPSS 20, SPSS 15. I believe other versions
produce it too.
What might it be?

Demonstration is below.

*Create data.
data list list /v1 to v5.
begin data
1.000  .     .     .     .
  .508 1.000  .     .     .
  .347  .583 1.000  .     .
  .204  .243  .294 1.000  .
  .108  .166  .213  .250 1.000
end data.
dataset name mat.

*Run (this works correctly).
matrix.
get m /missing= 1.
compute m= m&*t(m).
print m.
msave m /type= corr /outfile= * /variables= v1 to v5.
end matrix.

*Run this or close the untitled dataset manually.
dataset activate mat.

*Run again that same MATRIX program.
matrix.
get m /missing= 1.
compute m= m&*t(m).
print m.
msave m /type= corr /outfile= * /variables= v1 to v5.
end matrix.

*Enjoy the error.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).