Job a,b,c

All questions about Control-M jobs definitions
Post Reply
User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Job a,b,c

Post by philmalmaison » 12 Mar 2008 10:54

Hy,
just a little question :
is there a way to schedule the following jobs:
job A is waiting for time
job B should be schedule on a futur odat
job C wait for job A and wait for job B if job B is plan

note : job A and job B have different ODAT (odat and odat +1)

regards,
Philmalmaison

hipikll

Post by hipikll » 12 Mar 2008 11:47

It seems, that the job C depends on scheduling of B on next day? isn't it? So i would look this way, because dependency on job A is simple.

If i understand, job B is scheduled on DAY1 with odate of DAY1+1?
You also can schedule make job B to be ordered day before to wait for correct ODATE (i'm sure you know how to ;-) ).

So:
1) create a jobX to schedule a jobB with ODAT+1 (with wait for date)
2) in jobX define ON STMNT which will check, if the jobB was successfuly ordered (from sysout, from RC of jobX) and if it is, do "Order/Force JobC"

You have to try, which return codes ctmorder is returning and how the structure of sysout. My suggestion stays on this. I do not have time to play around with it.

User avatar
schidl
Nouveau
Nouveau
Posts: 16
Joined: 11 Jun 2007 12:00
Location: Germany
Contact:

Post by schidl » 12 Mar 2008 12:48

Hi,

in this case we are using Group-Scheduling with different options:

1. Way:
Define Job A and C in one "normal" table, B as a group schedule table.

The group schedule table gives the OUT-Cond for Job C not Job B!

Define in the group schedule table a scheduling TAG with the same scheduling criteria as Job A nd Job C, in JOB B the "correct" scheduling criteria.

What happens now:

The scheduling group for JOB B will be planned empty every Day regarding the scheduling criteria and will set the OUT-cond for JOB C. If the scheduling criteria for job B will be arrived, it will also ordered INSIDE OF THE SCHEDULING GROUP and the SCHEDULING GROUP will set the OUT-cond for JOB C, if JOB B ends with OK.

2. Way:
Define all 3 jobs in a group scheduling table and set the ADJUST CONDITION Parameter in the Group Scheduling Table.

We are using Group Scheduling Tables on Z/Os and UNIX with a lot of success.

regards,
schidl

hipikll

Post by hipikll » 12 Mar 2008 2:04

Shidl,
but your sollution is, if jobB is to be run on the same day as jobC has to. But jobC (as i understand) is to be submited a day before jobB and only if jobB will be ordered. So in your sollution, jobB is still waiting in group and group does not send condition to C - only after jobB ends (and this is on next day).

If i correctly understand the problem of phillmaison. (and your sollution)

User avatar
richardoku
Nouveau
Nouveau
Posts: 20
Joined: 11 Mar 2008 12:00

Post by richardoku » 12 Mar 2008 2:54

Hi All,

to my opinion both hipikll's & schidl's solutions will work. My favourite is to get everything in one Group Scheduling table (schidl's 2.way option).

To clarify:
build one group schedule with the 3 jobs, use 'Adjust condition' on Group level, define tags with the desired schedule criteria. Then create the dependencies; job A to job B and job A to job C (hipikll's concern) then from job B to job C.

Suppose job A and C are planned from Monday thru Thursday and job B is planned from Tuesday thru Friday (one day later) then Control-M will ensure that Job C is not going to wait for Job B (when Job B is not on AJF, e.g. on Monday). If Job B is on AJF then Job C will wait for that Job B to complete (Tuesday thru Thursday). If only Job B is on AJF (on Friday) this is the only job that will be executed.

What about this suggestion? (got a 6.3.01 'deftable' XML-file available on request)

Best regards

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Job a,b,c

Post by philmalmaison » 14 Mar 2008 1:34

So some additional questions.
one is to create a schedule group, two is to create the tree jobs in the schedule group, schedule group with the ADJUST CONDITION set to YES.

ok but what should be the schedule criteria of the scheduling group

I know for the jobs, so does the criteria inside scheduling group have to be set with all days ?

for ex:
job a = monday to thursday
job b = friday
job c = monday to thursday

what should be the schedule criteria of the scheduling group

regards
Philmalmaison

User avatar
richardoku
Nouveau
Nouveau
Posts: 20
Joined: 11 Mar 2008 12:00

Post by richardoku » 14 Mar 2008 2:01

Hi Philmalmaison,

There will be various possibilities. This is just one of them:

At the Schedule Group definition create one tag 'mon-thu', select 'All' Month Days AND Week Days 'mon' thru 'thu' & select Months All.
Create another tag 'friday', select 'All' Month Days AND Week Days 'fri' & select Months All (jan thru dec).

Next step is to create the jobs A, B & C. It is ok to leave their Schedule Criteria blanco. Just set 'Tag Relationship' to 'Or'. Then press the 'Select Tags' button to include tag 'mon-thu' for Job A & C. Job B will be included with tag 'friday' only.

This should do the trick.

Any questions let me know.
Greetings!

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 14 Mar 2008 11:14

thanks for all
i need to test now

regards
philmalmaison

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 19 Mar 2008 11:36

Hy,
So impossible to add existing jobs to a new scheduling group ?
anybody know something about it (using desktop)

regards
Philmalmaison

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 19 Mar 2008 11:52

philmalmaison wrote:Hy,
So impossible to add existing jobs to a new scheduling group ?
anybody know something about it (using desktop)

regards
Philmalmaison
Try using Find&Update....

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 19 Mar 2008 4:26

no way i must use copydefjob

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 19 Mar 2008 7:54

Hi

You can use XML exportdeftable and deftable utilities, and add your job in XML file.

So concerning Control-M Desktop and the fact you can't be able to add a job, you must use a skeleton with scheduling group information including table, group, application and datacenter.

Try it again...

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 20 Mar 2008 3:59

done thanks

Post Reply