Hello,
The Wakeup function seems unrecognized. The wakeup function allows you to specify the date and time to delay the execution.
Indeed in my Windows machine it works but not working on my Linux Machine with SAS 9.4.
DATA _null_;
rc=wakeup(DHMS(TODAY(),3,7,30));
RUN;
ERROR 68-185: The function WAKEUP is unknown, or cannot be accessed.
Any ideas?
Thanks
@Quentin you are right, of course. The proper way to use the sleep function is this:
%let sleep_until='10jul2017:14:30:00'dt;
data _null_;
sleeptime = &sleep_until - time();
slept = sleep(sleeptime,1);
run;
as this forces sleep() to use seconds as the unit across all platforms.
Or
%let sleep_until='10jul2017:14:30:00'dt;
data _null_;
sleeptime = &sleep_until - time();
call sleep(sleeptime,1);
run;
WAKEUP is a Windows-only feature of SAS.
You won't find it in the generic SAS documentation of functions and call routines.
To achieve something similar on any other platform, do this:
%let sleep_until='10jul2017:14:30:00'dt;
data _null_;
sleeptime = &sleep_until - time();
slept = sleep(sleeptime);
run;
@Quentin you are right, of course. The proper way to use the sleep function is this:
%let sleep_until='10jul2017:14:30:00'dt;
data _null_;
sleeptime = &sleep_until - time();
slept = sleep(sleeptime,1);
run;
as this forces sleep() to use seconds as the unit across all platforms.
Or
%let sleep_until='10jul2017:14:30:00'dt;
data _null_;
sleeptime = &sleep_until - time();
call sleep(sleeptime,1);
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.