BookmarkSubscribeRSS Feed
_AW_
Calcite | Level 5
I have a program that calls a number of other macro programs in sequential order.

However some of the programs are not dependent on the previous completing.

Let's say macros 1,2,3,4,5 need to run sequentially and are dependent on the previous macro(s) executing to completion.

There is also macros A,B,C,D,E that do not have to wait until the previous macros complete.

Let's also assume the 1,2,3,4,5 need to complete before A,B,C,D,E are submitted.

Does anyone know if or how I could multi-thread and submit A,B,C,D,E to all run at the same time and have them run independently.

Thanx.
_AW_
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I might consider it be called job/task-scheduling. You can spawn independent SAS tasks in your SAS operating environment.

And without a scheduling subsystem, you can write logic to "sleep" and "awaken" to test for some crumbs/morsels that are left by a predecessor job/process.

And, SAS jobs can be executed in sequence using various techniques, such as parent/child process/task execution or sequential threading (A completes, then submits B, C, D, and waits for B and C before submitting E - waits for D and E, then submits F).

Sure it's possible. Recommend reviewing the particular SAS companion guide for your OS, with focus on the OS system interfaces, such as CALL EXECUTE, CALL SYSTEM, and FILENAME PIPES engine, to start.

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument for this topic/post:

batch program scheduling site:sas.com
LinusH
Tourmaline | Level 20
You might also consider the technique called MP CONNECT, see on-line doc for details.

/Linus
Data never sleeps
DanielSantos
Barite | Level 11
Yep,

Either leave it to the system/scheduler
or
if your site has SAS/CONNECT licensed then MP CONNECT gives you the ability to submit asynchronous remote/local processes.

http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/a002626619.htm

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
deleted_user
Not applicable
Thanks to all.

_AW_
data_null__
Jade | Level 19
I believe all these features you desire are provided for with the SAS statements SYSTASK and WAITFOR.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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