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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1163 views
  • 0 likes
  • 6 in conversation