BookmarkSubscribeRSS Feed
ANIRBAN2
Fluorite | Level 6

There is piece of code after the program is is fully executed with output i want a sound.

Call sound doesnot work already tried.

 

THE CODE IS:-

%macro alarm(hr=,min=);
data _null_;
%do %while(1);
%let x=%sysfunc(datetime());
%let y=%sysfunc(hour(&x));
%let z=%sysfunc(minute(&x));
%if &y.=&hr. and &z.=&min. %then %goto exit;
%end;
%exit:
%put "WAKE UP ITS TIME";
%put %str(&y.:&z.);
Run;
%mend;

%alarm(hr=22,min=11);

3 REPLIES 3
Reeza
Super User
How is your SAS installation set up?
I'm assuming this is not on Academics on Demand?
ChrisHemedinger
Community Manager

With SAS Studio and your SAS session running on a remote location, call sound or similar techniques aren't possible. You won't be able to tell SAS to trigger a sound that you hear on your local machine.

 

Alternative ways to notify yourself that a job is complete: tell SAS to send an email, or a text/SMS message (using the email trick), or send a message to a Slack or Microsoft Teams channel.

 

How to send email using SAS (includes SMS message technique)

How to send a Slack message using SAS

How to send a Microsoft Teams message using SAS

SAS Innovate 2025: Call for Content! Submit your proposals before Sept 25. Accepted presenters get amazing perks to attend the conference!
Quentin
Super User

I don't know about sounds via Studio, but as a side note, rather than use this infinite loop you might want to use the SLEEP or WAKEUP functions which are designed for this purpose, and should consume less resources.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1276 views
  • 10 likes
  • 4 in conversation