Is there a wait or sleep function like SAS "sleep"?

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

Is there a wait or sleep function like SAS "sleep"?

Merlin Marshall
Hi all,

In SAS there is a sleep function, where you can suspend job execution for a
specified period of time, or based on a calculation of sleep time.  An
example is

data payroll;
   time_slept=sleep(20,1);
   ...more SAS statements...
run;
where SAS delays the execution of this data step for 20 seconds.

Is there something like this in SPSS?  I've tried searching on "sleep" and
"wait", but am not finding anything much except some Python coding involving
wait.

One of my colleagues wants to delay processing SPSS syntax in a remote
submit.  I am not sure if he wants to just hold off on running jobs until
the middle of the night, or if he wants to make sure some other job runs
first before the second bit tries to execute.

Thank you,
Merlin Marshall
Center for Human Resource Research
The Ohio State University
Columbus Ohio

=====================
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: Is there a wait or sleep function like SAS "sleep"?

Jon K Peck
There is no built-in sleep function, but it is trivial to do this with Python:
begin program.
import time
time.sleep(20)
end program.

The sleep time could be parameterized if needed.

Another alternative would be use the OS job scheduler to start an SPSS job at a scheduled time (or use C&DS if they have that installed).


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Merlin Marshall <[hidden email]>
To:        [hidden email],
Date:        12/19/2013 07:56 AM
Subject:        [SPSSX-L] Is there a wait or sleep function like SAS "sleep"?
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi all,

In SAS there is a sleep function, where you can suspend job execution for a
specified period of time, or based on a calculation of sleep time.  An
example is

data payroll;
  time_slept=sleep(20,1);
  ...more SAS statements...
run;
where SAS delays the execution of this data step for 20 seconds.

Is there something like this in SPSS?  I've tried searching on "sleep" and
"wait", but am not finding anything much except some Python coding involving
wait.

One of my colleagues wants to delay processing SPSS syntax in a remote
submit.  I am not sure if he wants to just hold off on running jobs until
the middle of the night, or if he wants to make sure some other job runs
first before the second bit tries to execute.

Thank you,
Merlin Marshall
Center for Human Resource Research
The Ohio State University
Columbus Ohio

=====================
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: Is there a wait or sleep function like SAS "sleep"?

Bruce Weaver
Administrator
In reply to this post by Merlin Marshall
Has your colleague looked at the Production Jobs utility?

http://pic.dhe.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.help%2Fidh_prod.htm


Merlin Marshall wrote
Hi all,

In SAS there is a sleep function, where you can suspend job execution for a
specified period of time, or based on a calculation of sleep time.  An
example is

data payroll;
   time_slept=sleep(20,1);
   ...more SAS statements...
run;
where SAS delays the execution of this data step for 20 seconds.

Is there something like this in SPSS?  I've tried searching on "sleep" and
"wait", but am not finding anything much except some Python coding involving
wait.

One of my colleagues wants to delay processing SPSS syntax in a remote
submit.  I am not sure if he wants to just hold off on running jobs until
the middle of the night, or if he wants to make sure some other job runs
first before the second bit tries to execute.

Thank you,
Merlin Marshall
Center for Human Resource Research
The Ohio State University
Columbus Ohio

=====================
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
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Is there a wait or sleep function like SAS "sleep"?

Merlin Marshall
In reply to this post by Jon K Peck
Hi Jon,

I will pass this along, thank you.

Merlin


On Thu, Dec 19, 2013 at 10:03 AM, Jon K Peck <[hidden email]> wrote:
There is no built-in sleep function, but it is trivial to do this with Python:
begin program.
import time
time.sleep(20)
end program.

The sleep time could be parameterized if needed.

Another alternative would be use the OS job scheduler to start an SPSS job at a scheduled time (or use C&DS if they have that installed).


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: <a href="tel:720-342-5621" value="+17203425621" target="_blank">720-342-5621




From:        Merlin Marshall <[hidden email]>
To:        [hidden email],
Date:        12/19/2013 07:56 AM
Subject:        [SPSSX-L] Is there a wait or sleep function like SAS "sleep"?
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi all,

In SAS there is a sleep function, where you can suspend job execution for a
specified period of time, or based on a calculation of sleep time.  An
example is

data payroll;
  time_slept=sleep(20,1);
  ...more SAS statements...
run;
where SAS delays the execution of this data step for 20 seconds.

Is there something like this in SPSS?  I've tried searching on "sleep" and
"wait", but am not finding anything much except some Python coding involving
wait.

One of my colleagues wants to delay processing SPSS syntax in a remote
submit.  I am not sure if he wants to just hold off on running jobs until
the middle of the night, or if he wants to make sure some other job runs
first before the second bit tries to execute.

Thank you,
Merlin Marshall
Center for Human Resource Research
The Ohio State University
Columbus Ohio

=====================
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: Is there a wait or sleep function like SAS "sleep"?

Merlin Marshall
In reply to this post by Merlin Marshall
Hi Bruce,

I will pass along the link.

Thank you,

Merlin

On Thu, 19 Dec 2013 07:07:28 -0800, Bruce Weaver <[hidden email]>
wrote:

>Has your colleague looked at the Production Jobs utility?
>
>http://pic.dhe.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.help%2Fidh_prod.htm
>
>
>
>Merlin Marshall wrote
>> Hi all,
>>
>> In SAS there is a sleep function, where you can suspend job execution for
>> a
>> specified period of time, or based on a calculation of sleep time.  An
>> example is
>>
>> data payroll;
>>    time_slept=sleep(20,1);
>>    ...more SAS statements...
>> run;
>> where SAS delays the execution of this data step for 20 seconds.
>>
>> Is there something like this in SPSS?  I've tried searching on "sleep" and
>> "wait", but am not finding anything much except some Python coding
>> involving
>> wait.
>>
>> One of my colleagues wants to delay processing SPSS syntax in a remote
>> submit.  I am not sure if he wants to just hold off on running jobs until
>> the middle of the night, or if he wants to make sure some other job runs
>> first before the second bit tries to execute.
>>
>> Thank you,
>> Merlin Marshall
>> Center for Human Resource Research
>> The Ohio State University
>> Columbus Ohio
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>
>> LISTSERV@.UGA
>
>>  (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
>
>
>
>
>
>-----
>--
>Bruce Weaver
>[hidden email]
>http://sites.google.com/a/lakeheadu.ca/bweaver/
>
>"When all else fails, RTFM."
>
>NOTE: My Hotmail account is not monitored regularly.
>To send me an e-mail, please use the address shown above.
>
>--
>View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Is-there-a-wait-or-sleep-function-like-SAS-sleep-tp5723669p5723672.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

=====================
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