IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Post In conditions to ControlM from INTRDR/JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
waveal

New User


Joined: 27 Jan 2007
Posts: 5
Location: Manila, Philippines

PostPosted: Wed Oct 26, 2011 1:24 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 26, 2011 1:30 pm
Reply with quote

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
View user's profile Send private message
waveal

New User


Joined: 27 Jan 2007
Posts: 5
Location: Manila, Philippines

PostPosted: Wed Oct 26, 2011 1:36 pm
Reply with quote

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
View user's profile Send private message
waveal

New User


Joined: 27 Jan 2007
Posts: 5
Location: Manila, Philippines

PostPosted: Wed Oct 26, 2011 1:39 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 26, 2011 1:41 pm
Reply with quote

It should all be in the control M documentation
Back to top
View user's profile Send private message
waveal

New User


Joined: 27 Jan 2007
Posts: 5
Location: Manila, Philippines

PostPosted: Wed Oct 26, 2011 1:50 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 26, 2011 2:17 pm
Reply with quote

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
View user's profile Send private message
waveal

New User


Joined: 27 Jan 2007
Posts: 5
Location: Manila, Philippines

PostPosted: Wed Oct 26, 2011 3:00 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 26, 2011 3:06 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Oct 26, 2011 5:26 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 27, 2011 4:03 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to load to DB2 with column level ... DB2 6
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Db2 SQL - how to switch among differe... DB2 18
No new posts To search DB2 table based on Conditio... DB2 1
No new posts Help file transmision AFT CONTROLM EM All Other Mainframe Topics 0
Search our Forums:

Back to Top