Hi there. I'm running into a bit of an issue in that the SPSS software (data file, output, and syntax windows) crashes when I run a piece of code. When I run the syntax slower (i.e. using the red breakpoints), then it appears to run ok.
I'm wondering if there is a command to slow down the syntax run; or at least a pause command. Between outputs, is there a piece of code that can be written to "pause the processor" for 2 or 3 seconds before running the next command?
Thanks for your help.
This topic has been locked.
Pinned topic Slowing down SPSS syntax
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
SystemAdmin 110000D4XK1106 Posts
Re: Slowing down SPSS syntax2012-11-06T15:02:23ZThis is the accepted answer. This is the accepted answer.It shouldn't be necessary to slow down the syntax, but it is true that in older versions of Statistics, sometimes the Viewer process would fall behind the backend process. The backend is supposed to wait when the frontend work queue is full, but because some things happen asynchronously, there were situations when this did not work right, mainly when using scripting apis and producing large tables.
If you want to stall the backend and you have installed the Python Essentials, you could insert this code.
begin program. import time time.sleep(2) end program.
This waits for 2 seconds. On Windows you could also do the equivalent with Basic scripting.