Re: how to execute SAS macro in a scheduled manner

  • Follow


to get it more concrete:

I don't think that there is a %sleep macro, so I tried

%let dummy=%sysfunc(sleep(5));

to let the execution sleep for 5 seconds at that location.
To use only %sysfunc(sleep(5)) is not a good idea, because that function
returns the seconds as result.

That should do it (don't know if 5 sec are ok, could be less or more...)

Gerhard




On Wed, 20 Jan 2010 10:45:14 -0600, Data _null_; <iebupdte@GMAIL.COM>
wrote:

>You probably want to SLEEP.  Read data some sleep a while, read
again, ....
>
>You can also WAKEUP but I think you want to SLEEP.
>
>On 1/20/10, Xin Wei <xinwei@stat.psu.edu> wrote:
>> hi, everyone:
>> i have a SAS macro loop that consists of 100 cycles. I am hoping to
>> execute 1 cycle per minute (this job is about web fetching so my IP
would
>> be blocked if I retrieved too much data from the server in a very short
>> time).
>> does everyone know any way to temporarily suspend SAS job and resume it
>> when certain consition is met (based on system time?)
>>
>>
>> thanks in advance
>>
>> Xin
>>
0
Reply gerhard.hellriegel (2531) 1/20/2010 7:25:39 PM

Simply

data _null_ ;
  s = sleep(60) ;
run ;

Depending on the environment, you may need to represent the value in
milliseconds.
0
Reply Chris 1/21/2010 9:03:28 AM


1 Replies
281 Views

(page loaded in 0.041 seconds)

Similiar Articles:













7/24/2012 11:34:38 AM


Reply: