BookmarkSubscribeRSS Feed
Sandy10
Calcite | Level 5
Hi. I have a Dynamic SAS dataset with job names and its corresponding dependencies. The dependencies might be waiting for other jobs as well. Could you please advise 
Exsmple below: Let me know any queries,
Main Table contains:

MasterJobName Dependencies
ABC DEF
GHI

DEF KJL


Log Table:

Jobname Status
ABC P
DEF F
GHI P
KJL P


ABC can be triggered only when DEF and GHI are completed
successfully, but DEF can be triggerd only when KJL is completed successfully.
Also when a job is failed, other jobs which are not dependent should keep executing
WHen a job is completed, status is updated in log table.
how to trigger the jobs from this table in SAS?

Thanks,
9 REPLIES 9
RW9
Diamond | Level 26 RW9
Diamond | Level 26

What software are you using?  For this type of task using Enterprise Guide and setting up flows would likely be the way to go.  

Sandy10
Calcite | Level 5

Hi.

 

I am using SAS EG . But actually, what we use is controlm scheduler for the dependencies and triggering  . There are controlm jobs for each and there are around 5000 SAS Jobs. To reduce the controlm jobs, now the reqmnt is to maintain all dependencies in a  table and trigger the jobs, 

Sandy10
Calcite | Level 5

A SAS code has to be written for this. I am not sure how we wil know if a child job is completed successfully, i mean we can check the log, but how long to wait before triggering the master job . 

Kurt_Bremser
Super User

Control-M is an enterprise scheduler. 5000 jobs is almost nothing to it. Don't start reinventing the wheel when you've already got the perfect tool.

If you want to reduce the number of jobs, look for SAS programs that can be combined into one.

Sandy10
Calcite | Level 5
Hi. To avoid many controlm jobs this is a new requirement,
Kurt_Bremser
Super User

@Sandy10 wrote:
Hi. To avoid many controlm jobs this is a new requirement,

Idiocy. It's only getting worse when you start mixing environments.

It only makes sense where you have a bunch of SAS jobs that can easily(!) be combined into one, and where the intermediate results are not important (eg for other jobs). As soon as you get more-than-plain-simple job logic, STAY WITH CONTROL-M.

AlanC
Barite | Level 11

Look at the systask and waitfor commands. Here is a link under 9.2 (has not changed as far as I know):

 

https://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-stmt-waitfor....

 

 

https://github.com/savian-net
Sandy10
Calcite | Level 5
This seems to be a windows command. We are using Linux .
Sandy10
Calcite | Level 5

Hi All. Thanks for replies .My main doubt is if a job(JobA)  is dependent on  job(JobB) which in turn is dependent on another job(JobC),  how will i know if Job C is completed . How long to wait for a job to be completed to proceed to another job ? Thanks,

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
  • 9 replies
  • 1283 views
  • 0 likes
  • 4 in conversation