Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2012-11-06T15:02:23Z by SystemAdmin
t_allan
t_allan
1 Post
ACCEPTED ANSWER

Pinned topic Slowing down SPSS syntax

‏2012-11-06T14:30:16Z |
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.
T
Updated on 2012-11-06T15:02:23Z at 2012-11-06T15:02:23Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1106 Posts
    ACCEPTED ANSWER

    Re: Slowing down SPSS syntax

    ‏2012-11-06T15:02:23Z  in response to t_allan
    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.