View previous topic :: View next topic
|
Author |
Message |
waveal
New User
Joined: 27 Jan 2007 Posts: 5 Location: Manila, Philippines
|
|
|
|
Hello,
I have a rather weird question. Is it possible to post an IN condition to control M OS/390 from a JCL? The situation is this: I have a job(say, Job A) that is triggered by a transaction and is sent to INTRDR for execution. And then, there is a second job (say, Job B), cyclic, waiting in control M that will pick up the file output of job A.
Job A is triggered every 15 minutes and Job B is scheduled 5 minutes after the theoretical start time of Job A. Sometimes, job A and Job B will run concurrently and Job B fails with a JCL error since the file is not yet created.
I was only thinking of a straight forward solution of limiting the runs of Job B by posting an in condition from job A jcl to controlM(if ever this is possible) but other solutions are most welcome (resource control?)
Thank you in advance.
n.b: I did not design this workflow and I am only supporting the system.
ps. i've read some posts by dick scherrer that uses gdgs as a lookout but this seems to be too taxing on the system (if i were to schedule a lookout job every 5 minutes considering that the file is very critical, the system is shared by several divisions and night batch is running for some divisions during the time my division is online) |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10884 Location: italy
|
|
|
|
why not schedule job b upon the creation of the relevant <trigger> file from job a ?
job b should take care of deleting the <trigger> dataset upon completion
You do not schedule any lookout ... it is the job scheduler that will take care of everything
done properly it will schedule things for any number of job A submissions
( not at the same time ) |
|
Back to top |
|
|
waveal
New User
Joined: 27 Jan 2007 Posts: 5 Location: Manila, Philippines
|
|
|
|
Hello Enrico,
Thank you for your suggestion.
Job B actually is a control D report creating job. It picks up the flat file created by Job A and turns it into a cdam report file. Job B triggers another element (control D element) for report decollation and sending to control D PC.
I actually thought of incorporating the steps of Job B into Job A so that it would run as one thorough job but the next question is, how do i trigger the control D element to pick up the cdam file? (which brings me back to square one) |
|
Back to top |
|
|
waveal
New User
Joined: 27 Jan 2007 Posts: 5 Location: Manila, Philippines
|
|
|
|
i think i misunderstoon your post, enrico. is there a way (like a filewatcher) to let Job B run once Job A creates the file? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
It should all be in the control M documentation |
|
Back to top |
|
|
waveal
New User
Joined: 27 Jan 2007 Posts: 5 Location: Manila, Philippines
|
|
|
|
Hello expat,
we have external triggers in our scheduler but I've only seen samples for TDE transfers. TDE script triggers the job once the file is created as a post processing run. but i havent come across any external triggers coming from a jcl(?) |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
what happens if job A fails, what tracks it ?
do you have CMEM running on your system ? if yes, you can track the job and on successful completion of job A you can do the usual post processing ie. post a condition to kick off job B.
Your decollating mission will need to consume/delete/clean up the condition is preparation for the next successful run of job A.
Yes, you can post a condition in batch mode using IOACND.
Gerry |
|
Back to top |
|
|
waveal
New User
Joined: 27 Jan 2007 Posts: 5 Location: Manila, Philippines
|
|
|
|
Hello Gerry,
thank you for that. i'll ask my system admin if we have cmem. i'll aslo look for documentation on IOACND.
Thanks again |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
just check if CMEM started task is running.
Also with CMEM you can track dataset creation to trigger job B.
The best bet is for job A arriving with a TYPRUN=HOLD and CMEM to track it's arrival.
This way you can have full control when job A runs. ie don't start job A until job B and decollating mission have completed.
Gerry |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1044 Location: Richmond, Virginia
|
|
|
|
Why not just have the in-cond for B be the creation of A's file that B wants? Then A's status is irrelevant and need not be mentioned in B's scheduling parms. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Phil,
I did say
Quote: |
Also with CMEM you can track dataset creation to trigger job B.
|
The only problem with job A running externally to Control-M without a TYPRUN=HOLD is you have no control when job A runs. ie. if you have no initiators available for job A to run or enqueues, you can have a situation where multiple A jobs can run immediately one after the other before B job gets a look in which case it throws the file process out of sequence not to mention the decollating mission or job A fails if the dataset has not been cleaned up by job B.
Gerry |
|
Back to top |
|
|
|