Tuesday, November 20, 2012

May be Conditions (Manual Conditions)

Sometimes we will get different scenarios in Scheduling control-M jobs, one of that is like below.

Lets say there are JOB-A,JOB-B,JOB-C. JOB-C, is dependent on other 2 jobs.
  • If JOB-A & JOB-C are DAILY Jobs
  • JOB-B is Mon, Wed, Fri job 
If you try to implement the above change the first thing comes to your mind is using DUMMY job (in case if you are good in Scheduling though).

if it is a single scenario in your entire batch jobs then we can use Dummy jobs, lets say you have 100's of similar scenarios. then it would be difficult to have 100's of dummy jobs, it will make your scheduling solution complex, so it is better to use May Be Conditions or Manual Conditions.

Steps to Implement this:

  1. Out Conditions of JOB-A and JOB-B should be  #-JOB-A-OK and   #-JOB-B-OK
  2. In  Conditions of JOB-C is  #-JOB-A-OK and   #-JOB-B-OK
  3. Create 1 job with TASK TYPE as Command and use "ctmldnrs -CALCCOND -ADDMODE NO" as a commad
  4. Create 1 job with TASK TYPE as Command and use ctmldnrs -LOAD "#-*" as a commad
The job in Step3 will create a default output file in <controlm_user_dir/ctmldnrs.dat>

The job in Step4 will read the conditions from a default file <controlm_user_dir/ctmldnrs.dat> and load it on Conditions table. This means the jobs which are not in schedule for that day and if there are any jobs waiting for their conditions (#- Conditions) will be created in Conditions table.

Note:
  • Step3 job must run immediately after New Day Process
  • Step4 job must run after Step3 job
I hope it is clear. Please drop your comments in case if you have any queries.

1 comments:

A Rackowski said...

Would like to learn more details about this

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Awesome Deals | Bloggerized by Mahendra - 24x7FunOnline