LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 14 Mar 2011 06:30:19 -0400
Reply-To:     Michael Raithel <michaelraithel@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Michael Raithel <michaelraithel@WESTAT.COM>
Subject:      Re: Chance to Make SAS-L History: Did You Know That...
Content-Type: text/plain; charset="us-ascii"

Dear SAS-L-ers,

Did you know that... can use the WAKEUP function to put a SAS program to sleep and specify when it is to resume executing?

The WAKEUP function directs SAS to put your program to sleep for the duration that you specify within the function. When that duration has passed, your SAS program wakes up and continues to execute, starting with the statements found directly after the statement containing the WAKEUP function.

You can specify a date-time value, a time (in hours), or the number of seconds before/after midnight for SAS to wait until waking up and running the rest of your program. Here is an example of each:

data _null_; dozeuntil = wakeup("04JUL2011:12:00:00"dt); put "The 4th of July picnic is just starting."; run;

data _null_; dozeuntil = wakeup("22:30:00"t); put "Time for the Letterman show!"; run;

data _null_; dozeuntil = wakeup(120); put "It is 2-hours past midnight!"; run;

data _null_; dozeuntil = wakeup(-120); put "It is 2-hours until midnight!"; run;

There are more nuances to the WAKEUP function than can be covered in a simple tip, including limits on the durations that you can specify. Check the following link to get more information on the WAKEUP function::<>

Best of luck in all of your SAS endeavors!

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel "The man who wrote the book on performance" E-mail:

Author: Tuning SAS Applications in the MVS Environment

Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition

Author: The Complete Guide to SAS Indexes

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ They're here! - Carol Ann in Poltergeist +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Back to: Top of message | Previous page | Main SAS-L page