BookmarkSubscribeRSS Feed
hellohere
Pyrite | Level 9

Runing a macro with sleep function, but need interrupt/stop in middle.

 

BUT did not see "the running man". How to stop/interrupt the thread?!

 

%macro doloopx(ctx);	
	%do i=1 %to &ctx.;
		%doloop(); // 

		data _x_;
		call sleep(60, 1);
		run;quit;
	%end;
%mend;

%doloopx(10);
6 REPLIES 6
Quentin
Super User

What IDE are you using, Enterprise Guide or SAS Studio or something else?

 

When I run it in PC SAS (Display Manager), I can interrupt it using the the Break button (!).

 

In Enterprise Guide, I can interrupt it with the Cancel button (red square)

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
hellohere
Pyrite | Level 9
PC SAS. The "running man" and "break(!)" are not visible until the thread finishes...
Quentin
Super User

Looks like an old version.  Probably just the icon is missing.  Try CTRL-BREAK. 

 

Or look at how to add an icon.   You should be able to right-click the bar with the icons and select customize to add an icon, and interrupt/break should be an option to add.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
Quentin
Super User

Actually that menu bar you showed doesn't look like it should be the menu bar associated with a .sas program.  If you get to the point where you can see a running man, that is where you would want to add the interrupt icon.  Just curious what version of SAS are you using?  

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
hellohere
Pyrite | Level 9

Ye, you are right.

 

If nothing is done, the active window yields to "results", and the "running man" and "break" are gone.

 

If click .sas right after submit the code, the active window is still on .sas, the "running man" and "break" are still there. 

Can stop/interrupt. 

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!

How to Concatenate Values

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.

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
  • 6 replies
  • 694 views
  • 0 likes
  • 2 in conversation